Network processor test system

By introducing excitation message generator and verification module into the network processor test system, different types of excitation messages are generated and verified, the problem of insufficient business scenarios of traditional test solutions is solved, and more comprehensive performance testing and Efficient testing process.

CN118945079APending Publication Date: 2024-11-12YUSUR TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411229364.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

When testing network processors, traditional solutions are not sufficient for the business scenarios to fully verify their performance.

Method used

A network processor test system is designed, including an excitation message generator and a verification module. Different types of excitation messages are generated through randomly generated configuration information, sent to the network processor to be tested, and output through the verification module. The data is verified to ensure the accuracy of the test results.

Benefits of technology

The system can add more business scenarios during testing, improve testing efficiency, and automatically generate random incentive messages without multiple settings, ensuring the accuracy and comprehensiveness of the performance test results of the network processor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945079A_ABST
    Figure CN118945079A_ABST
Patent Text Reader

Abstract

The invention discloses a network processor test system, which comprises at least one excitation message generator and a verification module, the excitation message generator is used for generating an excitation message according to the received message data and randomly generated configuration information and sending the excitation message to the input port of the network processor to be tested, so that the network processor to be tested processes the excitation message and outputs data to be tested through the output port, different excitation message generators generate different excitation messages; and the verification module is used for receiving the to-be-verified data and verifying the to-be-verified data according to the stored expected data, and if the verification result is passed, the test result of the to-be-tested network processor is normal. According to the application, the received message data is processed through the excitation message generator, different excitation messages can be randomly obtained, the network processor to be tested is tested through various different excitation messages, and more service scenes can be added during testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data transmission, and in particular to a network processor testing system. Background Art

[0002] The network processor (NP) is highly flexible and scalable. It usually includes several or even dozens of micro-engines and several hardware coprocessors. Multiple micro-engines are processed in parallel inside the NP, and data service processing is realized through pre-compiled microcode programs. For some complex standard operations, such as memory operations, route lookup, traffic scheduling, and AES encryption, hardware coprocessors are used to improve performance. In order to ensure the performance of the NP, it is necessary to test the NP.

[0003] Currently, various NP tests are mainly implemented by pre-storing stimulus messages.

[0004] However, since the business scenarios that NP needs to support are relatively complex, the business scenarios that can be tested by pre-storing stimulus messages are not sufficient. Summary of the invention

[0005] In view of this, the present application provides a network processor testing system to solve the problem that the business scenarios of traditional solutions for testing network processors are not sufficient.

[0006] The first aspect of the present application provides a network processor test system, comprising: at least one stimulus message generator and a verification module; the stimulus message generator is used to generate a stimulus message according to received message data and randomly generated configuration information, and send the stimulus message to the input port of the network processor to be tested, so that the network processor to be tested processes the stimulus message and outputs the data to be tested through the output port, wherein different stimulus message generators generate different stimulus messages; the verification module is used to receive the data to be tested and verify the data to be tested according to the stored expected data. If the verification result is passed, the test result of the network processor to be tested is normal.

[0007] Optionally, the stimulus message generator includes: a message processing module and a format conversion module; the message processing module is used to store received message data and randomly generated configuration information, and when the network processor to be tested is started, at least part of the message data is sent to the format conversion module in the form of a data packet according to the configuration information; the format conversion module is used to convert the received data packet into a data format corresponding to the network processor to be tested to obtain the stimulus message.

[0008] Optionally, the stimulus message generator further includes: a flow control module; the flow control module is used to randomly generate a flow control signal, and send the stimulus message to the input port of the network processor to be tested according to the flow control signal.

[0009] Optionally, the stimulus message generator further includes: a random number generator, a first buffer area and a second buffer area; the random number generator is used to generate the configuration information and send it to the message processing module; the message processing module is used to write the received message data and the configuration information into the first buffer area and the second buffer area in the form of a data packet, wherein the configuration information is used to indicate the interval and effective address length of the storage address reading; the first buffer area is used to cache the starting address of the data packet, the data length of the data packet and the configuration information; the second buffer area is used to cache the packet data of the data packet; the message processing module is used to read the configuration information from the first buffer area when the network processor to be tested is started, determine the data range to be read from the first buffer area according to the effective address length indicated by the configuration information and the starting address of the data packet, read the starting address and data length of at least part of the data packet from the read data range according to the interval of the storage address reading and the storage address of the data packet, and read the corresponding packet data from the second buffer area according to the starting address and data length of at least part of the data packet read, and send it to the format conversion module.

[0010] Optionally, the message processing module is used to write the configuration information into the first read address of the first cache area.

[0011] Optionally, the verification module includes: a processing submodule and an expected data cache area; the expected data cache area is used to cache the received expected data; the processing submodule is used to receive the data to be verified, and convert the data to be verified into a data format corresponding to the expected data, and compare the processed data to be verified with the expected data to obtain the verification result.

[0012] Optionally, the processing submodule includes: a calculation unit and a comparison unit; the calculation unit is used to convert the data to be verified into a data format corresponding to the expected data, and perform a cyclic redundancy check to obtain the processed data to be verified; the comparison unit is used to compare the processed data to be verified with the expected data, if the comparison results are the same, a first verification result indicating a pass is obtained, if the comparison results are different, a first verification result indicating a fail is obtained, and the verification result is determined based on the first verification result.

[0013] Optionally, the comparison unit is used to store the data to be verified corresponding to the processed data to be verified and report an exception when the verification result is failed.

[0014] Optionally, the message processing module is used to add a preservation sequence number to the packet data read from the second cache area so that the data to be tested output by the network processor to be tested carries the preservation sequence number; the comparison unit is used to determine the arrangement order of the packet data in the data to be tested after processing according to the order in which the calculation unit receives the packet data in the data to be tested; if the preservation sequence number carried by the packet data with an earlier sequence in the arrangement order is greater than the preservation sequence number carried by the packet data with a later sequence in the arrangement order, a second verification result indicating failure is obtained; if the preservation sequence number carried by the packet data with an earlier sequence in the arrangement order is less than the preservation sequence number carried by the packet data with a later sequence in the arrangement order, a second verification result indicating pass is obtained; the verification result is determined based on the first verification result and the second verification result.

[0015] Optionally, the number of the stimulus message generators is the same as the number of input ports included in the network processor to be tested, and the output end of each stimulus message generator is connected one-to-one with the input ports included in different network processors to be tested.

[0016] The present application processes the received message data through a stimulus message generator, and can randomly obtain different stimulus messages. The network processor to be tested is tested by using a variety of different stimulus messages, and more business scenarios can be added during the test. The stimulus message generator can automatically generate stimulus messages randomly, and there is no need to perform multiple settings. Only the message data needs to be received once, thereby improving the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0018] Figure 1 is a schematic diagram of a network processor testing system according to an embodiment of the present application;

[0019] Figure 2 is a schematic diagram of an incentive message generator according to an embodiment of the present application;

[0020] Figure 3 is a schematic diagram of an incentive message generator according to another embodiment of the present application;

[0021] Figure 4 is a schematic diagram of a verification module according to an embodiment of the present application;

[0022] Figure 5 It is a schematic diagram of a verification module according to another embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.

[0024] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0025] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0026] The technical solutions in the embodiments of the present application are clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application. In the absence of conflict, the following embodiments and their technical features can be combined with each other.

[0027] Figure 1 FIG. 1 is a schematic diagram of a network processor testing system according to an embodiment of the present application. Figure 1 As shown, the network processor test system 100 includes: at least one stimulus message generator 101 and a verification module 102 .

[0028] The stimulus message generator 101 is used to generate a stimulus message according to the received message data and the randomly generated configuration information, and send the stimulus message to the input port 201 of the network processor 200 to be tested, so that the network processor 200 to be tested processes the stimulus message and outputs the test data through the output port 202, wherein different stimulus message generators generate different stimulus messages. The verification module 102 is used to receive the test data and verify the test data according to the stored expected data. If the verification result is passed, the test result of the network processor 200 to be tested is normal.

[0029] In order to test the network processor 200 to be tested, a stimulus message may be first generated by the stimulus message generator 101 according to the received message data and the randomly generated configuration information. The message data is sent by an external data sending end, which may be a host, and sends the message data for NP testing to the stimulus message generator 101. While sending the message data to the stimulus message generator 101, the host sends the message data to a normal NP used for comparison, collects the data output by the normal NP as expected data, and sends the expected data to the verification module 102, which stores the expected data. The stimulus message generator 101 will generate configuration information randomly by itself, and process the received message data through the configuration information to shuffle the message data, so as to form different stimulus messages such as back-to-back, error packets, and interleaved large and small packets, and input the stimulus message into the input port 201 of the network processor 200 to be tested. After that, the network processor 200 to be tested will output the data to be tested to the verification module 102 through the output port 202. The verification module 102 verifies the data to be tested according to the stored expected data. The specific verification method includes but is not limited to verifying that the data is the same or verifying that the identifiers in the data are the same. When the verification result of the verification module 102 is passed, it can be determined that the test result of the network processor 200 to be tested is normal. If the verification result is not passed, it proves that the test result of the network processor 200 to be tested is abnormal.

[0030] like Figure 1 As shown in , the number of stimulus message generators 101 is the same as the number of input ports 201 included in the network processor 200 to be tested, and the output end of each stimulus message generator 101 is connected one-to-one with the input ports 201 included in different network processors 200 to be tested. By setting in this way, different stimulus message generators 101 can generate different stimulus messages and send them to the network processor 200 to be tested for processing at the same time, which has a high stimulus message generation efficiency. However, only one or fewer stimulus message generators 101 can be set, so that at least one stimulus message generator 101 generates stimulus messages multiple times and inputs them into the input port 201 of the network processor 200 to be tested. Similarly, Figure 1 As shown in the figure, there is one verification module 102, and the verification modules 102 receive the data to be verified output by the output port 202 respectively, and verify them respectively, but multiple verification modules 102 can also be set. For example, setting the same number of verification modules 102 as the output port 202, and making the verification modules 102 and the output port 202 one-to-one connected, can improve the efficiency of data verification.

[0031] In an embodiment of the present application, the received message data is processed by the stimulus message generator 101, and different stimulus messages can be obtained randomly. The network processor 200 to be tested is tested by a variety of different stimulus messages, and more business scenarios can be added during the test. The stimulus message generator 101 can automatically generate stimulus messages randomly, without the need for multiple settings, and only needs to receive the message data once, thereby improving the test efficiency.

[0032] Figure 2 is a schematic diagram of an incentive message generator according to an embodiment of the present application. Figure 2 As shown, the stimulus message generator 101 includes: a message processing module 1011 and a format conversion module 1012 .

[0033] The message processing module 1011 is used to store the received message data and the randomly generated configuration information, and when the network processor 200 to be tested is started, at least part of the message data is sent to the format conversion module 1012 in the form of a data packet according to the configuration information. The format conversion module 1012 is used to convert the received data packet into a data format corresponding to the network processor 200 to be tested, and obtain a stimulus message.

[0034] The stimulus message generator 101 may specifically include a message processing module 1011 and a format conversion module 1012. After receiving the message data sent by the external data sending end, the message processing module 1011 first stores the message data, then randomly generates configuration information, and stores the configuration information at the same time. When the network processor 200 to be tested is started, the message processing module 1011 processes the message data according to the configuration information, for example, processes part of the message data into a data packet, or processes all the message data into a data packet, and then sends the data packet to the format conversion module 1012. The format conversion module 1012 performs data conversion on the data packet to obtain a stimulus message, for example, converts it into the AXIS bus data format, and the AXIS bus data format is the data format of the network processor 200 to be tested.

[0035] In the embodiment of the present application, the message processing module 1011 processes the message data before the network processor to be tested 200 is started, and can send the data packet obtained by processing the message data to the format conversion module 1012 in time when the network processor to be tested 200 is started. The format conversion module 1012 further processes the data packet into a data format corresponding to the network processor to be tested 200, which can improve the efficiency of inputting the stimulus message into the network processor to be tested 200.

[0036] In a possible implementation, the incentive message generator 101 further includes: a flow control module 1013 .

[0037] The flow control module 1013 is used to randomly generate a flow control signal and send a stimulus message to the input port 201 of the network processor 200 to be tested according to the flow control signal.

[0038] The stimulus message generator 101 may also include a flow control module 1013. After the format conversion module 1012 obtains the stimulus message, the stimulus message can be stored in a first-in-first-out queue (FIFO). At this time, the flow control module 1013 will randomly generate a flow control signal, for example, generate a random ready high and low level signal. Since the network processor 200 to be tested will only shake hands at a high level, part of the stimulus message can be randomly sent to the input port 201 of the network processor 200 to be tested through the random ready high and low level signals.

[0039] In the embodiment of the present application, the randomness of the input to the network processor 200 to be tested can be further improved through the flow control module 1013 .

[0040] Figure 3 is a schematic diagram of an incentive message generator according to another embodiment of the present application. Figure 3 As shown, the incentive message generator 101 includes: a message processing module 1011, a format conversion module 1012, a random number generator 1014, a first buffer area 1015 and a second buffer area 1016.

[0041] The random number generator 1014 is used to generate configuration information and send it to the message processing module 1011. The message processing module 1011 is used to write the received message data and configuration information into the first buffer area 1015 and the second buffer area 1016 in the form of a data packet, wherein the configuration information is used to indicate the interval of storage address reading and the effective address length. The first buffer area 1015 is used to cache the starting address of the data packet, the data length of the data packet and the configuration information. The second buffer area 1016 is used to cache the packet data of the data packet. The message processing module 1011 is used to read the configuration information from the first buffer area 1015 when the network processor 200 to be tested is started, determine the read data range from the first buffer area 1015 according to the effective address length indicated by the configuration information and the starting address of the data packet, read the starting address and data length of at least part of the data packet from the read data range according to the interval of storage address reading and the storage address of the data packet, and read the corresponding packet data from the second buffer area 1016 according to the starting address and data length of at least part of the data packet read, and send it to the format conversion module 1012.

[0042] The stimulus message generator 101 may also include a first buffer area 1015 and a second buffer area 1016. The first buffer area 1015 is used to cache the starting address, data length and configuration information of the data packet. The second buffer area 1016 is used to cache the packet data of the data packet. For example, the data storage of the first buffer area 1015 may be as shown in Table 1:

[0043] Table 1

[0044]

[0045] It can be seen that after the configuration information generated by the random number generator 1014 is sent to the message processing module 1011, the message processing module 1011 stores the configuration information in the first read address of the first buffer area 1015. Such storage allows the configuration information to be read first when the first buffer area 1015 is read, and then at least part of the data is read from the first buffer area 1015 according to the configuration information. The configuration information indicates the interval and effective address length of the storage address reading. According to the effective address length and the starting address of the data packet, the reading data range can be determined from the first buffer area 1015, and then according to the interval and the storage address of the data packet, the starting address and data length of at least part of the data packet can be read from the reading data range. For example, the data content stored in the first buffer area 1015 is as follows:

[0046] The data content of Addr[9:0]=0 is {16'd2,16'd30},

[0047] The data content of Addr[9:0]=1 is {16'd2,16'd0},

[0048] The data content of Addr[9:0]=2 is {16'd3,16'd2},

[0049] The data content of Addr[9:0]=3 is {16'd2,16'd5},

[0050] The data content of Addr[9:0]=4 is {16'd2,16'd7},

[0051] The data content of Addr[9:0]=5 is {16'd9600,16'd9},

[0052] The data content of Addr[9:0]=6 is {16'd10,16'd9609},

[0053] .......

[0054] According to the configuration information recorded in the first read address of the first buffer area 1015 shown in Table 1, the effective address read random interval is 2, and the effective address length is 30, that is, there are 30 effective addresses, which are Addr[9:0]=0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87. When reading, the data content of the first buffer area 1015 storage address Addr[9:0]=3 is {16'd2, 16'd5}, the data length of a single packet message in a single message data is 2, and the starting address of a single packet message in a single message data is 5, and so on, and the data to be read is read respectively.

[0055] The data storage of the second buffer area 1016 may be as shown in Table 2:

[0056] Table 2

[0057]

[0058]

[0059] According to the starting address and data length of the data packet read from the first buffer area 1015, the corresponding packet data is further read from the second buffer area 1016. The packet data stored in the second buffer area 1016 shown in Table 2 is as follows:

[0060] The data content of Addr[9:0]=0 is {'d0,4'd0,9'd0},

[0061] The data content of Addr[9:0]=1 is {256'd1111},

[0062] The data content of Addr[9:0]=2 is {'d0,4'd1,9'd0},

[0063] The data content of Addr[9:0]=3 is {256'd2222},

[0064] The data content of Addr[9:0]=4 is {256'd3333},

[0065] The data content of Addr[9:0]=5 is {'d0,4'd0,9'd1},

[0066] The data content of Addr[9:0]=6 is {256'd4444},

[0067] The data content of Addr[9:0]=7 is {'d0,4'd1,9'd1},

[0068] The data content of Addr[9:0]=8 is {256'd5555},

[0069] …….

[0070] The data content of the first cache area 1015 storage address Addr[9:0]=3 is {16'd2,16'd5}, so it can be concluded that what needs to be read is the second cache area 1016 storage address Addr[9:0]=5,6, that is, the corresponding data content of the second cache area 1016A ddr[9:0]=5 is {'d0,4'd0,9'd1}, which represents the first data of packet number 1 of message data 0, and the corresponding data content of the second cache area 1016 Addr[9:0]=6 is {256'd4444}, which represents the second data of packet number 1 of message data 0.

[0071] In an embodiment of the present application, by caching the starting address, data length and configuration information of the data packet in the first cache area 1015, and caching the packet data of the data packet in the second cache area 1016, data management can be facilitated and the efficiency of incentive message generation can be improved.

[0072] Figure 4 is a schematic diagram of a verification module according to an embodiment of the present application. Figure 4 The verification module 102 includes: a processing submodule 1021 and an expected data buffer area 1022 .

[0073] The expected data buffer area 1022 is used to buffer the received expected data. The processing submodule 1021 is used to receive the data to be verified, convert the data to be verified into a data format corresponding to the expected data, and compare the processed data to be verified with the expected data to obtain a verification result.

[0074] The verification module 102 may include a processing submodule 1021 and an expected data buffer area 1022. The processing submodule 1021 reads the expected data from the expected data buffer area 1022, and then processes the data to be tested received from the output port 202 of the network processor to be tested 200. Since the data sent by the network processor to be tested 200 is in a format such as the AXIS bus data format, which is not conducive to verification, the processing submodule 1021 first needs to perform data conversion to convert the data to be tested into a data format corresponding to the expected data, and then compare the processed data to be tested with the expected data to obtain a verification result.

[0075] In the embodiment of the present application, the processing submodule 1021 performs format conversion on the data to be verified, thereby improving the accuracy of data verification.

[0076] Figure 5 is a schematic diagram of a verification module of another embodiment of the present application, such as Figure 5 As shown, the processing submodule 1021 includes: a calculation unit 10211 and a comparison unit 10212;

[0077] The calculation unit 10211 is used to convert the verification data into a data format corresponding to the expected data, perform a cyclic redundancy check, obtain the processed verification data, and send the processed verification data to the comparison unit 10212. The comparison unit 10212 is used to compare the processed verification data with the expected data, if the comparison result is the same, obtain a first verification result indicating a pass, if the comparison result is different, obtain a first verification result indicating a fail, and determine the verification result according to the first verification result.

[0078] The processing submodule 1021 may specifically include a calculation unit 10211 and a comparison unit 10212. After converting the format of the expected data, the calculation unit 10211 processes the test data through a cyclic redundancy check. When performing a cyclic redundancy check (CRC32), the specific polynomial may be: crc[31:0]=1+x^1+x^2+x^4+x^5+x^7+x^8+x^10+x^11+x^12+x^16+x^22+x^23+x^26+x^32. The cyclic redundancy check value obtained by calculation is compared with the expected data.

[0079] In the embodiment of the present application, by performing a cyclic redundancy check on the expected data after format conversion, numerical comparison can be performed directly, thereby making the comparison result more intuitive.

[0080] In a possible implementation, the comparison unit 10212 is configured to store the data to be verified corresponding to the processed data to be verified and report an exception when the verification result is a failure.

[0081] In the embodiment of the present application, the comparison unit 10212 stores and reports the to-be-tested data corresponding to the processed to-be-tested data with a failed verification result, which can facilitate analysis of the cause of the abnormality of the network processor 200 to be tested.

[0082] In a possible implementation, the message processing module 1011 is used to add a preservation sequence number to the packet data read from the second buffer area 1016, so that the to-be-tested data output by the network processor 200 to be tested carries the preservation sequence number;

[0083] The comparison unit 10212 is used to determine the arrangement order of the packet data in the data to be verified after processing according to the order in which the packet data in the data to be verified are received by the calculation unit 10211. If the preservation sequence number carried by the packet data that is sequenced earlier in the arrangement order is greater than the preservation sequence number carried by the packet data that is sequenced later in the arrangement order, a second verification result indicating failure is obtained; if the preservation sequence number carried by the packet data that is sequenced earlier in the arrangement order is less than the preservation sequence number carried by the packet data that is sequenced later in the arrangement order, a second verification result indicating pass is obtained. The verification result is determined based on the first verification result and the second verification result.

[0084] On the basis of data verification, a sequence preservation verification function can also be added. Specifically, before inputting the network processor 200 to be tested, a sequence preservation number is added to the packet data read from the second buffer area 1016 through the message processing module 1011. For example, when reading the first beat of data of each data packet in the second buffer area 1016, a self-accumulated sequence preservation number M is added to ram2_data0[47:16]. The sequence preservation number is self-incremented by 1 each time the packet data is read from the second buffer area 1016, and the same message data corresponds to a group of sequence preservation numbers, and the sequence preservation numbers of different message data are independently marked. The first data of packet number 1 of message data 0 is: {208'd0, 32'd0, 3'd0, 4'd0, 9'd1}, when reading data from the second buffer area 1016 for the nth time, the first data of packet number 1 of message data 0 needs to be modified to: {208'd0, 32'dM, 3'd0, 4'd0, 9'd1}. And so on.

[0085] After adding the preservation sequence number, the data to be tested output by the network processor 200 to be tested will carry the preservation sequence number. Then, the comparison unit 10212 will determine the arrangement order of the packet data in the data to be tested after processing according to the receiving order of the packet data in the data to be tested by the calculation unit 10211, and then compare the preservation sequence number of the data to be tested with the sorting number of the data to be tested in the receiving sequence. Since the network processor 200 to be tested may delete some packet data during the processing process, as long as the preservation sequence number carried by the packet data with a sequence earlier in the arrangement order is smaller than the preservation sequence number carried by the packet data with a sequence later in the arrangement order, it can be proved that the preservation sequence is normal.

[0086] In the embodiment of the present application, the message processing module 1011 adds a sequence number to the packet data read from the second buffer area 1016, so that it can be determined in subsequent inspections whether there are packet losses, error packets, and out-of-order packets.

[0087] Although the present application has been shown and described with respect to one or more implementations, equivalent variations and modifications will occur to those skilled in the art based on reading and understanding of this specification and the accompanying drawings. The present application includes all such modifications and variations and is limited only by the scope of the appended claims. In particular, with respect to the various functions performed by the above-mentioned components, the terms used to describe such components are intended to correspond to any component (unless otherwise indicated) that performs the specified function of the component (e.g., it is functionally equivalent), even if it is not structurally equivalent to the disclosed structure that performs the functions in the exemplary implementation of the present specification shown herein.

[0088] That is, the above description is only an embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the specification and drawings of the present application, such as the mutual combination of technical features between the embodiments, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.

[0089] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0090] In order to enable any technician in the field to implement and use the application, the application provides the above description. In the above description, various details are listed for the purpose of explanation. It should be understood that those of ordinary skill in the art can recognize that the application can also be implemented without using these specific details. In other embodiments, the well-known process will not be elaborated in detail to avoid unnecessary details that make the description of the application obscure. Therefore, the application is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in the application.

[0091] It should be noted that, under the premise of no conflict, the various embodiments and / or the technical features in the various embodiments described in this application can be arbitrarily combined with each other, and the technical solution obtained after the combination should also fall within the protection scope of this application.

[0092] It should be understood that the specific examples in the embodiments of the present application are only to help those skilled in the art to better understand the embodiments of the present application, rather than to limit the scope of the embodiments of the present application. Those skilled in the art can make various improvements and modifications based on the above embodiments, and these improvements or modifications all fall within the scope of protection of the present application.

[0093] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A network processor testing system, include: At least one stimulus message generator and verification module; The stimulus message generator is used to generate a stimulus message according to the received message data and the randomly generated configuration information, and send the stimulus message to the input port of the network processor to be tested, so that the network processor to be tested processes the stimulus message and outputs the test data through the output port, wherein different stimulus message generators generate different stimulus messages; The verification module is used to receive the data to be verified and verify the data to be verified according to the stored expected data. If the verification result is passed, the test result of the network processor to be tested is normal.

2. The system according to claim 1, It is characterized in that The incentive message generator includes: a message processing module and a format conversion module; The message processing module is used to store the received message data and the randomly generated configuration information, and when the network processor to be tested is started, send at least part of the message data to the format conversion module in the form of a data packet according to the configuration information; The format conversion module is used to convert the received data packet into a data format corresponding to the network processor to be tested to obtain the stimulus message.

3. The system according to claim 2, It is characterized in that The incentive message generator also includes: a flow control module; The flow control module is used to randomly generate a flow control signal, and send the stimulus message to the input port of the network processor to be tested according to the flow control signal.

4. The system according to claim 2, It is characterized in that The incentive message generator also includes: a random number generator, a first buffer area and a second buffer area; The random number generator is used to generate the configuration information and send it to the message processing module; The message processing module is used to write the received message data and the configuration information into the first buffer area and the second buffer area in the form of a data packet, wherein the configuration information is used to indicate the interval of storage address reading and the effective address length; The first buffer area is used to buffer the starting address of the data packet, the data length of the data packet and the configuration information; The second buffer area is used to buffer the packet data of the data packet; The message processing module is used to read the configuration information from the first cache area when the network processor to be tested is started, determine the read data range from the first cache area according to the effective address length indicated by the configuration information and the starting address of the data packet, read the starting address and data length of at least part of the data packet from the read data range according to the interval of reading the storage address and the storage address of the data packet, and read the corresponding packet data from the second cache area according to the starting address and data length of at least part of the data packet read, and send it to the format conversion module.

5. The system according to claim 4, It is characterized in that The message processing module is used to write the configuration information into the first read address of the first buffer area.

6. The system according to claim 5, It is characterized in that The verification module includes: a processing submodule and an expected data buffer area; The expected data buffer area is used to buffer the received expected data; The processing submodule is used to receive the data to be verified, convert the data to be verified into a data format corresponding to the expected data, and compare the processed data to be verified with the expected data to obtain the verification result.

7. The system according to claim 6, It is characterized in that The processing submodule includes: a calculation unit and a comparison unit; The calculation unit is used to convert the data to be verified into a data format corresponding to the expected data, and perform a cyclic redundancy check to obtain the processed data to be verified, and send the processed data to the comparison unit; The comparison unit is used to compare the processed data to be verified with the expected data. If the comparison results are the same, a first verification result indicating a pass is obtained. If the comparison results are different, a first verification result indicating a fail is obtained, and the verification result is determined based on the first verification result.

8. The system according to claim 7, It is characterized in that The comparison unit is used to store the data to be verified corresponding to the processed data to be verified and report an exception when the verification result is failed.

9. The system according to claim 7, It is characterized in that The message processing module is used to add a preservation sequence number to the packet data read from the second buffer area, so that the to-be-tested data output by the network processor to be tested carries the preservation sequence number; The comparison unit is used to determine the arrangement order of the packet data in the data to be verified after processing according to the order in which the calculation unit receives the packet data in the data to be verified; if the preservation sequence number carried by the packet data that is sequenced earlier in the arrangement order is greater than the preservation sequence number carried by the packet data that is sequenced later in the arrangement order, a second verification result indicating failure is obtained; if the preservation sequence number carried by the packet data that is sequenced earlier in the arrangement order is less than the preservation sequence number carried by the packet data that is sequenced later in the arrangement order, a second verification result indicating pass is obtained; the verification result is determined according to the first verification result and the second verification result.

10. The system according to any one of claims 1 to 9, It is characterized in that The number of the stimulus message generators is the same as the number of input ports included in the network processor to be tested, and the output end of each stimulus message generator is connected one-to-one with the input ports included in different network processors to be tested.

Citation Information

Cited By

  • Flow generation device

    CN121711286A