COPROCESSOR, METHOD PERFORMED THEREBY AND COMMUNICATION DEVICE
A coprocessor, a method performed thereby and a communication device are disclosed. According to an embodiment, the coprocessor periodically processes multiple rows of a timer table in a predetermined memory space on a row-by-row basis, to use a time period required for processing the multiple rows as a time granularity for time counting. Each of at least one row of the timer table indicates a corresponding session and has multiple parts. Each of the multiple parts indicates corresponding one of multiple timers and maintains a counting value as a function of a number of the counted time granularities. The coprocessor performs, for the at least one row, one or more predetermined actions based on the counting values for the multiple timers.
Embodiments of the disclosure generally relate to data processing, and, more particularly, to a coprocessor, a method performed thereby and a communication device.
BACKGROUNDThis section introduces aspects that may facilitate better understanding of the present disclosure. Accordingly, the statements of this section are to be read in this light and are not to be understood as admissions about what is in the prior art or what is not in the prior art.
Monitoring the performance of a link, including the measurement of packet loss and packet delay, is an important content of operation, administration and management (OAM). For example, Y.1731 loss measurement (LM)/delay measurement (DM) and two-way active measurement protocol (TWAMP) are two common protocols for link performance monitoring. Y.1731 LM/DM is for layer 2 and TWAMP is for layer 3.
Although the two protocols are different, but their behaviors are similar for realizations.
There are four timestamps in the above process. The sender MEP (or simply referred to as the sender) 110 is responsible for sending the test message carrying the exit timestamp 1 (TS1). The reflector MEP (or simply referred to as the reflector) 120 receives the test message and records the arrival time TS2. The reflector 120 sends the rebound message (or response message) carrying TS3. Finally, the rebound message returns to the sender 110 which records the arrival time TS4. The sender 110 can calculate one-way/two-way delay by using these four timestamps, and calculate one-way/two-way loss by using the sequence No. carried by the test message/response message.
SUMMARYThis summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
One of the objects of the disclosure is to provide an improved solution for data processing. In particular, one of the problems to be solved by the disclosure is that there is no efficient solution for processing a plurality of sessions each requiring a plurality of timers.
According to a first aspect of the disclosure, there is provided a method performed by a coprocessor. The method may comprise periodically processing multiple rows of a timer table in a predetermined memory space on a row-by-row basis, to use a time period required for processing the multiple rows as a time granularity for time counting. Each of at least one row of the timer table may indicate a corresponding session and have multiple parts. Each of the multiple parts may indicate corresponding one of multiple timers and maintain a counting value as a function of a number of the counted time granularities. The method may further comprise performing, for the at least one row, one or more predetermined actions based on the counting values for the multiple timers.
In this way, it is possible to use a simplified structure to implement a plurality of timers for each of one or more sessions.
In an embodiment of the disclosure, the coprocessor may be contained in a communication device to cooperate with a central processing unit (CPU) of the communication device.
In an embodiment of the disclosure, the multiple timers may comprise a first timer for counting a time interval between successive test messages to be sent from the coprocessor. The test message may be used for measuring communication status between the coprocessor and another communication device. The multiple timers may further comprise a second timer for counting a sending period during which a predetermined number of test messages are to be sent from the coprocessor. The multiple timers may further comprise a third timer for counting a timeout period. A test message can be determined as being lost when a response message in response to the test message is not received within the timeout period after the sending period.
In an embodiment of the disclosure, processing a row in the at least one row of the timer table may comprise one or more of: when a first counting value for the first timer in the row does not reach a first predetermined threshold, incrementing the first counting value by one; when the first counting value for the first timer in the row reaches the first predetermined threshold, resetting the first counting value to zero, and triggering a second counting value for the second timer in the row to be incremented by one; when the second counting value for the second timer in the row reaches a second predetermined threshold, resetting the second counting value to zero, and triggering a third counting value for the third timer in the row to be processed; when the third counting value for the third timer in the row does not reach a third predetermined threshold, and not all the response messages in response to the predetermined number of test messages have been received, incrementing the third counting value by one; and when the third counting value for the third timer in the row reaches the third predetermined threshold, or all the response messages in response to the predetermined number of test messages have been received, resetting the third counting value to zero.
In an embodiment of the disclosure, performing, for a row in the at least one row, one or more predetermined actions based on the counting values for the multiple timers may comprise one or more of: when a first counting value for the first timer in the row reaches a first predetermined threshold, sending a test message to the another communication device; when a third counting value for the third timer in the row reaches a third predetermined threshold, or all the response messages in response to the predetermined number of test messages have been received, generating a test report for reporting the measured communication status between the coprocessor and the another communication device; when the third counting value for the third timer in the row reaches the third predetermined threshold, sending the test report to a CPU that cooperates with the coprocessor, and reporting an interruption to the CPU.
In an embodiment of the disclosure, the test message may be an Ethernet message having a private message format. The private message format may have one or more of following fields: a first field indicating that the Ethernet message is a test message; a second field indicating one or more sessions related to the Ethernet message; a third field indicating how many sessions are contained in the Ethernet message; and a fourth field indicating the measured communication status.
In an embodiment of the disclosure, the test report may be sent to the CPU by one of: Ethernet port; and peripheral component interconnect express (PCIe) direct memory access (DMA).
In an embodiment of the disclosure, for a row in the at least one row of the timer table, separate memory spaces may be respectively used in two successive reporting periods to store information usable for generating a test report. The reporting period may be a combination of the sending period and the timeout period. The two successive reporting periods may overlap with each other by the timeout period of preceding one of the two successive reporting periods.
In an embodiment of the disclosure, the method may further comprise receiving a configuration from a CPU that cooperates with the coprocessor. The configuration may comprise one or more of: the time interval to be counted by the first timer; the predetermined number of the test messages to be sent in the sending period; the timeout period; and a message format of a test report.
In an embodiment of the disclosure, the predetermined memory space may be provided by a random access memory (RAM) of the coprocessor. Each of the multiple rows of the timer table may be stored in corresponding one address of the RAM.
In an embodiment of the disclosure, the coprocessor may be capable of supporting one or more of: Y.1731 loss measurement/delay measurement (LM/DM); two-way active measurement protocol (TWAMP); and bidirectional forwarding detection (BFD).
In an embodiment of the disclosure, the coprocessor may be implemented as at least one of: field programmable gate array (FPGA); application specific integrated circuit (ASIC); and data processing unit (DPU).
According to a second aspect of the disclosure, there is provided a coprocessor. The coprocessor may comprise a predetermined memory space configured to store a timer table. The coprocessor may further comprise a time counting component configured to periodically process multiple rows of the timer table in the predetermined memory space on a row-by-row basis, to use a time period required for processing the multiple rows as a time granularity for time counting. Each of at least one row of the timer table may indicate a corresponding session and have multiple parts. Each of the multiple parts may indicate corresponding one of multiple timers and maintain a counting value as a function of a number of the counted time granularities. The coprocessor may further comprise an action performing component configured to perform, for the at least one row, one or more predetermined actions based on the counting values for the multiple timers.
In this way, it is possible to use a simplified structure to implement a plurality of timers for each of a plurality of sessions.
In an embodiment of the disclosure, the coprocessor may be contained in a communication device to cooperate with a CPU of the communication device.
In an embodiment of the disclosure, the multiple timers may comprise a first timer for counting a time interval between successive test messages to be sent from the coprocessor. The test message may be used for measuring communication status between the coprocessor and another communication device. The multiple timers may further comprise a second timer for counting a sending period during which a predetermined number of test messages are to be sent from the coprocessor. The multiple timers may further comprise a third timer for counting a timeout period. A test message can be determined as being lost when a response message in response to the test message is not received within the timeout period after the sending period.
In an embodiment of the disclosure, the time counting component may be configured to process a row in the at least one row of the timer table by one or more of: when a first counting value for the first timer in the row does not reach a first predetermined threshold, incrementing the first counting value by one; when the first counting value for the first timer in the row reaches the first predetermined threshold, resetting the first counting value to zero, and triggering a second counting value for the second timer in the row to be incremented by one; when the second counting value for the second timer in the row reaches a second predetermined threshold, resetting the second counting value to zero, and triggering a third counting value for the third timer in the row to be processed; when the third counting value for the third timer in the row does not reach a third predetermined threshold, and not all the response messages in response to the predetermined number of test messages have been received, incrementing the third counting value by one; and when the third counting value for the third timer in the row reaches the third predetermined threshold, or all the response messages in response to the predetermined number of test messages have been received, resetting the third counting value to zero.
In an embodiment of the disclosure, the action performing component may be configured to perform, for a row in the at least one row, one or more predetermined actions based on the counting values for the multiple timers by one or more of: when a first counting value for the first timer in the row reaches a first predetermined threshold, sending a test message to the another communication device; when a third counting value for the third timer in the row reaches a third predetermined threshold, or all the response messages in response to the predetermined number of test messages have been received, generating a test report for reporting the measured communication status between the coprocessor and the another communication device; when the third counting value for the third timer in the row reaches the third predetermined threshold, sending the test report to a CPU that cooperates with the coprocessor, and reporting an interruption to the CPU.
In an embodiment of the disclosure, the test message may be an Ethernet message having a private message format. The private message format may have one or more of following fields: a first field indicating that the Ethernet message is a test message; a second field indicating one or more sessions related to the Ethernet message; a third field indicating how many sessions are contained in the Ethernet message; and a fourth field indicating the measured communication status.
In an embodiment of the disclosure, the test report may be sent to the CPU by one of: Ethernet port; and PCIe DMA.
In an embodiment of the disclosure, for a row in the at least one row of the timer table, separate memory spaces may be respectively used in two successive reporting periods to store information usable for generating a test report. The reporting period may be a combination of the sending period and the timeout period. The two successive reporting periods may overlap with each other by the timeout period of preceding one of the two successive reporting periods.
In an embodiment of the disclosure, the coprocessor may further comprise a reception component configured to receive a configuration from a CPU that cooperates with the coprocessor. The configuration may comprise one or more of: the time interval to be counted by the first timer; the predetermined number of the test messages to be sent in the sending period; the timeout period; and a message format of a test report.
In an embodiment of the disclosure, the predetermined memory space may be provided by an RAM of the coprocessor. Each of the multiple rows of the timer table may be stored in corresponding one address of the RAM.
In an embodiment of the disclosure, the coprocessor may be capable of supporting one or more of: Y.1731 LM/DM; TWAMP; and BFD.
In an embodiment of the disclosure, the coprocessor may be implemented as at least one of: FPGA; ASIC; and DPU.
According to a third aspect of the disclosure, there is provided a communication device. The communication device may comprise a coprocessor according to the above second aspect, and a CPU configured to cooperate with the coprocessor.
These and other objects, features and advantages of the disclosure will become apparent from the following detailed description of illustrative embodiments thereof, which are to be read in connection with the accompanying drawings.
For the purpose of explanation, details are set forth in the following description in order to provide a thorough understanding of the embodiments disclosed. It is apparent, however, to those skilled in the art that the embodiments may be implemented without these specific details or with an equivalent arrangement.
Timeout (or a loss threshold) is an interval of time (which may be expressed as a timestamp). A packet belonging to the test session that is being set up by the current Request-Session command will be considered lost if it is not received during Timeout seconds after it is sent. The significance of packet loss timeout is that when all messages are sent out from sender transmitter (TX), the session cannot end immediately, and the statistic of packets received by sender receiver (RX) cannot be counted immediately. It is necessary to wait for the time when the message is flying in Ethernet.
In the industry, a network controller generally requires reporting test results from the whole hour, it is real time. For example, test starts at 3:00. Assuming that the presentation time interval is 15 minutes, the test results will be presented at 3:00, 3:15, 3:30, 3:45, 4:00, 4:15, . . . When the time is up, the network controller will get the test results from the CPU of the equipment.
There may be three types of methods for implementing link performance monitoring. The first type is pure CPU method. The advantages of this method are obvious: control layer and test layer are both realized in CPU, so the internal thread communication in CPU is very convenient; and there is no extra overhead of inter-chip communication compared with the multi-chip method.
When the requirement is getting higher and higher, for example, the sending interval of test message is getting smaller and smaller, meanwhile the session number supported is increasing, the CPU cannot meet the requirement due to its limited performance. Firstly, the architecture of CPU is not suitable for so many parallel tasks. In addition, due to thread scheduling, time accuracy may be problematic.
The second type is specific ASIC method. ASIC (such as BRCM chip from Broadcom Corporation) is customized and has good performance, but its function is rigid. It cannot be modified flexibly, and it is not friendly to customers. The test parameters and items that can be presented to customers are not rich and cannot be customized.
The third type is “CPU +offload chip (such as FPGA)” method. It is used to realize acceleration, which is a common choice. Instead of realizing the function in a single chip, two independent chips cooperate to realize the function.
How to give full play to their strengths and achieve efficient cooperation is a challenge. After all, the cooperation of the two chips will bring extra overhead. In addition, the timeout function is not realized perfectly in the existing solution, so that there are errors in the test results presented to customers.
The present disclosure proposes an improved solution for data processing. In particular, the solution is applicable to the scenario where a protocol for link performance monitoring (e.g., Y.1731 LM/DM, TWAMP, BFD, etc.) is used between two communication devices. Although the principle of the present disclosure will be described hereinafter by taking the link performance monitoring as an example, those skilled in the art will understand that the principle of the present disclosure is also applicable to any other suitable scenario where one or more sessions each requiring a plurality of timers need to be processed.
Hereinafter, the solution will be described in detail with reference to
The at least one row of the timer table may correspond to the session(s) for which the time counting has been enabled. In a case where the number of the at least one row is smaller than the number of the multiple rows of the timer table, the remaining row(s) of the timer table except the at least one row may correspond to the session(s) for which the time counting has not been enabled, and such session(s) may be called idle session(s). For example, for an RAM having 512 addresses, if 500 sessions are started by the customer, then 500 addresses of the RAM which correspond to 500 rows of the timer table may be used for these 500 sessions. By the processing of these 500 rows of the timer table in each time period, the counting values for the multiple timers in these 500 rows can vary as a function of the number of the time granularities. To keep the time granularity to be constant, the remaining 12 rows of the timer table also need to be processed in each time period. Since the sessions corresponding to these 12 rows are in idle state, the processing of each of these 12 rows may be simply reading the counting values in the row (which may be initialized as zero) and writing the same counting values into the row.
As an exemplary example, the session corresponding to each of the at least one row of the timer table may be a session for link performance monitoring by using e.g. Y.1731 LM/DM, TWAMP, BFD, etc. This means the coprocessor may be capable of supporting one or more of Y.1731 LM/DM, TWAMP, BFD, etc. For this example,
For the above example of link performance monitoring, processing a row in the at least one row of the timer table may comprise one or more of blocks 606-614 of
At block 610, when the second counting value for the second timer in the row reaches a second predetermined threshold, the coprocessor resets the second counting value to zero, and trigger a third counting value for the third timer in the row to be processed. The second predetermined threshold may be determined as a quotient between the sending period and the time interval between successive test messages.
At block 612, when the third counting value for the third timer in the row does not reach a third predetermined threshold, and not all the response messages in response to the predetermined number of test messages have been received, the coprocessor increments the third counting value by one. The third counting value for the third timer may be initialized as zero. The third predetermined threshold may be determined as a quotient between the timeout period and the time interval between successive test messages. On the other hand, at block 614, when the third counting value for the third timer in the row reaches the third predetermined threshold, or all the response messages in response to the predetermined number of test messages have been received, the coprocessor resets the third counting value to zero.
Referring back to
For the above example of link performance monitoring, performing, for a row in the at least one row, one or more predetermined actions based on the counting values for the multiple timers may comprise one or more of blocks 716-720 of
At block 720, when the third counting value for the third timer in the row reaches the third predetermined threshold, the coprocessor sends the test report to a CPU that cooperates with the coprocessor, and reports an interruption (e.g. at the same time) to the CPU. In a case where the at least one row of the timer table corresponds to a plurality of sessions, the measured communication statuses of these plurality of sessions can be put together into the test report (e.g. in the form of one or more messages). In response to the interruption triggered by the coprocessor, the CPU can read all these measured communication statuses by using only one interaction between the CPU and the coprocessor. Compared with the traditional way of reading test result registers of the coprocessor, the number of interactions between the CPU and the coprocessor can be greatly reduced.
As an exemplary example, the test message may be an Ethernet message having a private message format. The private message format has one or more of following fields: a first field indicating that the Ethernet message is a test message; a second field indicating one or more sessions related to the Ethernet message; a third field indicating how many sessions are contained in the Ethernet message; and a fourth field indicating the measured communication status. With the private message format, the CPU can be allowed to easily identify information about session(s) and test result thereof. Optionally, the test report may be sent to the CPU by Ethernet port, or PCIe DMA, or any other suitable way.
Optionally, the coprocessor 1010 may further comprise a reception component 1018 configured to receive a configuration from a CPU 1020 that cooperates with the coprocessor 1010, as described above with respect to block 901. The configuration comprises one or more of: the time interval to be counted by the first timer; the predetermined number of the test messages to be sent in the sending period; the timeout period; a message format of a test report; etc. As also shown in
The CPU 1130 can issue relevant configuration to the offload chip 1120, including per session enable/disable, TX interval, message template, TX message number per presentation cycle, timeout threshold, etc.
The offload chip 1120 (e.g. the test message transmission component 1121) can periodically send test messages according to the time interval and packet template configured by the CPU 1130. The offload chip 1120 (e.g. the test message transmission component 1121) can maintain Sequence No. itself, by incrementing Sequence No. by one for each message sent. The offload chip 1120 may be a parallel architecture, which can support the parallel sending of thousands of sessions at the same time and meet the millisecond level interval.
The offload chip 1120 (e.g. the test message reception component 1122) can receive response messages and extract four Timestamp and Sequence No. The offload chip 1120 (e.g. the delay/loss statistic/calculation component 1124) can realize various statistics and calculations, which include per session delay/delay variation including two-way/far-end/near-end max/min/average, per session far-end/near-end loss, error counter, etc.
The offload chip 1120 (e.g. the private reporting message editor 1126) can lock test results and edit private reporting message when the timeout time is over or TX Sequence No. ==RX Sequence No., which can be detected by the timeout detection component 1123. The offload chip 1120 (e.g. the reporting control component 1125) can report PCIe DMA interrupt to the CPU 1130, indicating one private reporting message to the CPU 1130.
The CPU 1130 can create a thread for reading interrupt file description, once receiving an interruption. The CPU 1130 will trigger reading of DMA space and fetching of private reporting message that includes the test result. The test result can be stored in the test result memory 1131 and be further processed by the test result processing component 1132 according to an network management protocol used between the sender 1110 and the network controller 1150 so that the processed test result can be presented to the network controller 1150. It is also possible that the processing of the test result processing component 1132 is performed by the network controller 1150 so that the test result processing component 1132 is omitted from the sender 1110. Optionally, in addition to getting rough test results from the offload chip 1120, the CPU 1130 may make further statistics on the rough test results, so that the network controller 1150 can get the final test results from the CPU 1130.
In the sender 1110, the basic function of delay/loss test is realized by the offload chip 1120, and the CPU 1130 is responsible for presenting the results to customers. The functions realized by the offload chip 1120 include sending and receiving test messages, accurately calculating and counting test results, and accurately sending the test results to the CPU 1130 according to the time interval configured by customers.
To realize the above functions, the following timers need to be implemented for each session in the offload chip 1120. The first timer is used to realize the interval of sending messages. This interval may be ms level to second level. The second timer is used to realize the presentation interval configured by the customer. This interval may be at the minute level. The third timer is used to realize the timeout timer for waiting for the last message. This interval may be at the level of ms to seconds. The specification of delay/loss test may reach kilo level. There may be thousands of timers in total, which are relative and independent of each other. Therefore, how to implement a large scale of timers is a challenge, especially the time granularities of these timers are different, from ms to minutes.
In the embodiment of
As shown in
These three parts are relative. The second one is triggered by the first one, and the third one is triggered by the second one. If these three parts are independent three tables, it is easy to cause the asynchrony of the three parts, thus leading to errors.
These three parts are also independent of each other, and they are accumulated independently. When the threshold is reached, they are reset respectively.
Every time a session is scanned, the three timers can be monitored at the same time. This ensures the strict synchronization and accuracy of the three timers.
This control table can be maintained by the offload chip 1120, accumulated and compared with a threshold table as shown in
Correspondingly to the control table, the threshold table has three elements: TX interval threshold, TX sequence No. threshold per test cycle, and timeout threshold. The TX interval threshold is for per session and the time unit is scan round (corresponding to the time period required for processing the multiple rows as described above). The TX sequence No. threshold (how many packets should be sent per test cycle) is for per session. When the TX interval has been configured, the customer presentation interval can be equal to the number of packets in this presentation period. The timeout threshold is for per session and the time unit is scan round.
The TX interval threshold and timeout threshold are not the standard time, but the equivalent scanning times. Assuming that the clock frequency of the offload chip is k Mhz, then one clock cycle is 1000/k=j ns. For example, if the working clock of the offload chip is 250 Mhz, then one clock cycle is 4 ns. Using pipeline technology, it takes 2 clock cycles to complete one index's operation (or one row's operation). Assuming that the specifications (or the number of rows) supported by the offload chip are m, then the scanning time of the sender control table is m*2*j ns. For example, for an RAM having 512 addresses, it takes 512*2*4 ns=4096 ns to scan the entire sender control table from beginning to end. Then the time of scanning the entire sender control table can be taken as the time unit, instead of the real time. The granularity of the time unit is at about μs level.
Assuming that the interval of sending messages configured by the customer is p ms, then TX interval threshold=p*1000*1000/(m*2*j). For example, If the TX interval is 10 ms, then TX interval threshold is 10 ms/4096 ns=2441. This 2441 is the conversion of 10 ms into the new time unit. The calculation of the timeout threshold is similar to that of the TX interval threshold. For example, if the timeout period is 3s, then the timeout threshold is 3*109/4096=732421.
In addition, assuming that the customer presentation period is q minutes, then TX sequence No. threshold=q*60*1000/p. For example, if the presentation cycle required by the customer is 15 minutes, and a message is sent per 10 ms, then there are 15*60*1000/10 ms=90000 messages in a presentation cycle.
The offload chip constantly scans the three-in-one control table and compares it with the value of the threshold table, while updating the three-in-one control table. This operation is carried out every clock cycle. In every clock cycle, the session scan control module will sequentially read the sender control table, accumulate it, and write it back.
In the above specific example, the counter of the TX interval timer sequentially takes the value of 0, 1, 2, 3, . . . , 2441. When the counter of the TX interval timer==2441, it means that the 10 ms interval is up, and session 0 starts to send out one packet. At the same time, incrementing TX sequence No. by one (TX sequence No. +1) is triggered. The offload chip resets the counter of the TX interval timer (in this example, when the TX interval timer==2441, it is reset to 0) and starts counting the new interval.
Since there are 90000 messages in a presentation cycle, the offload chip waits until TX sequence No.==90000*cycle number, meaning that the transmission of this test cycle is completed. The offload chip resets TX sequence No., and starts a new presentation cycle.
At this time, the TX sequence No. is notified to the RX timeout module, which starts the countdown of timeout. When Timeout counter==Timeout threshold, this presentation cycle is over. No matter whether the last message arrives correctly or is lost on the way, an accurate loss statistical result can be obtained at this time. The reporting of test results can be triggered.
In
The TX interval timer loop control (scan round) is used to monitor whether the TX interval counter reaches the TX Interval threshold. When it does, it needs to trigger TX sequence No. (per report cycle)+1, and it clears itself.
The TX sequence No. loop control (per report cycle) is used to monitor whether the number of sent packets in this test cycle reaches the threshold. If so, it triggers the countdown of timeout timer, and it clears itself.
The timeout loop control (scan round) is used to monitor whether the timeout counter reaches the threshold. If it reaches the threshold, it means that the current test is completed, and the test result reporting is triggered.
Continuing with the above assumptions, a complete process is as follows. Session scan loop control starts to scan the table from address 0. When this session is scanned, if the counter of the TX interval timer is not equal to 2441, the session scan loop control adds 1 to the counter and writes it back. If it is equal to 2441, the counter of the TX interval timer is cleared, the accumulation starts again so that a new packet transmission cycle is started.
At the same time, the counter of the TX sequence No. is incremented by one (only when the counter of the TX interval timer is equal to 2441, and the TX sequence No. remains unchanged at other times). If the counter of the TX sequence No. is not equal to 90000, the TX sequence No. loop control adds 1 to the counter and writes it back.
When the counter of the TX sequence No. is equal to 90000, the TX sequence No. loop control clears it, and the counter of the timeout timer starts to accumulate. If it is not equal to 732421, the timeout loop control adds 1 to the counter and writes it back.
When this counter is equal to 732421 (732421*4096 ns=3 s), it is cleared. This presentation period is over. The timeout timer is only cycled once in a presentation period. That is, it is cycled once only when the counter of the TX sequence No. equals to 90000. The TX interval timer performs 90,000 cycles in a presentation period.
At block 1412, the sequence No. loop control is run. At block 1413, it is determined whether the counter of the TX sequence No. meets the TX sequence No. threshold. If the determination result at block 1413 is positive, the counter of the TX sequence No. is cleared at block 1414 and the timeout timer is run at block 1421. At block 1422, it is determined whether either one of the counter of the timeout timer meeting the timeout threshold, and TX sequence No. equals RX sequence No. is met. If the determination result at block 1422 is negative, the counter of the timeout timer is incremented by one at block 1423. On the other hand, if the determination result at block 1422 is positive, the counter of the timeout timer is cleared at block 1425, and result reporting is triggered at block 1424.
The field “Test Result” carry test raw test items.
For on-demand mode, the test items may include, but not limited to: Far-end delay max/Far-end delay min/Far-end delay average, Near-end delay max/Near-end delay min/Near-end delay average, Two-way delay max/Two-way delay min/Two-way delay average, Far-end delay variation max/Far-end delay variation min/Far-end delay variation average, Near-end delay variation max/Near-end delay variation min/Near-end delay variation average, Two-way delay variation max/Two-way delay variation min/Two-way delay variation average, Far-end loss/Near-end loss/Two-way loss, Total send packet counter/Total receive packet counter, Period send packet counter/Period receive packet counter, Far-end sequence number/Near-end sequence number, etc.
The offload chip can package the test results of multiple sessions or even all sessions into one private message and report it to the CPU. Compared with the way that the CPU actively get the test results of the offload chip by PCIe memory read operation, this can reduce the number of times that the CPU accesses the offload chip, and the test results of all sessions can be reported to the CPU several times or even once. Thereby, the interaction efficiency between the CPU and the offload chip can be improved and the burden of the CPU can be reduced.
Suppose there are 512 sessions, 50 test items per session, and each test item is 8 bytes. Then, total 400 bytes are required per session. The traditional PCIe memory read operation reads 4 bytes at a time. One session requires the CPU to read the offload chip 100 times. With 512 sessions, the CPU needs to visit the offload chip 51200 times. Thus, the ratio between the interactions required by the traditional method and the interactions required by the embodiment is 51200:1. This means that the number of interactions can be reduced by tens of thousands of times. Apparently, the way of packaging the test results and reporting to the CPU has great advantages.
Based on the above description, in the embodiment of
For the task of link performance monitoring, when a session is enabled, the CPU only needs to set the relevant configuration to the offload chip, including e.g. the template of the message, the transmission (TX) interval of the session, the number of messages to be sent in one test cycle, and the timeout threshold. In addition, the CPU receives the test result reported by the offload chip and presents it to a network controller. The CPU is not required to start many timers, which avoids the CPU from consuming more resources.
The offload chip starts timers for each session, and the granularity of time may be at us level. The range of respective used intervals is from us to second, giving customers more choices, and this choice will not put any burden on the offload chip. With the support of the accurate timer, the offload chip can realize large-scale and accurate test message transmission. The offload chip receives the test message, realizes timeout checking and calculates the delay/loss. With the support of the accurate timer, accurate TX/RX counter and accurate reporting interval can be achieved. Thereby, accurate loss/delay statistics and test result reporting to the CPU per test cycle can be realized.
To reduce or minimize the interaction between the CPU and the offload chip, and reduce the burden on the CPU, the offload chip packages test data of several or even all sessions into a private reporting message, sends it to the CPU through Ethernet port or PCIe DMA. Note that if there is no Ethernet port between the CPU and the offload chip, PCIe is common on the printed circuit board (PCB).
In general, the various exemplary embodiments may be implemented in hardware or special purpose circuits, software, logic or any combination thereof. For example, some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software which may be executed by a controller, microprocessor or other computing device, although the disclosure is not limited thereto. While various aspects of the exemplary embodiments of this disclosure may be illustrated and described as block diagrams, flow charts, or using some other pictorial representation, it is well understood that these blocks, apparatus, systems, techniques or methods described herein may be implemented in, as non-limiting examples, hardware, software, firmware, special purpose circuits or logic, general purpose hardware or controller or other computing devices, or some combination thereof.
As such, it should be appreciated that at least some aspects of the exemplary embodiments of the disclosure may be practiced in various components such as integrated circuit chips and modules. It should thus be appreciated that the exemplary embodiments of this disclosure may be realized in an apparatus that is embodied as an integrated circuit, where the integrated circuit may comprise circuitry (as well as possibly firmware) for embodying at least one or more of a data processor, a digital signal processor, baseband circuitry and radio frequency circuitry that are configurable so as to operate in accordance with the exemplary embodiments of this disclosure.
It should be appreciated that at least some aspects of the exemplary embodiments of the disclosure may be embodied in computer-executable instructions, such as in one or more program modules, executed by one or more computers or other devices. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types when executed by a processor in a computer or other device. The computer executable instructions may be stored on a computer readable medium such as a hard disk, optical disk, removable storage media, solid state memory, RAM, etc. As will be appreciated by one skilled in the art, the function of the program modules may be combined or distributed as desired in various embodiments. In addition, the function may be embodied in whole or in part in firmware or hardware equivalents such as integrated circuits, field programmable gate arrays (FPGA), and the like.
References in the present disclosure to “one embodiment”, “an embodiment” and so on, indicate that the embodiment described may include a particular feature, structure, or characteristic, but it is not necessary that every embodiment includes the particular feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an embodiment, it is submitted that it is within the knowledge of one skilled in the art to implement such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described.
It should be understood that, although the terms “first”, “second” and so on may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second element, and similarly, a second element could be termed a first element, without departing from the scope of the disclosure. As used herein, the term “and/or” includes any and all combinations of one or more of the associated listed terms.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the present disclosure. As used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises”, “comprising”, “has”, “having”, “includes” and/or “including”, when used herein, specify the presence of stated features, elements, and/or components, but do not preclude the presence or addition of one or more other features, elements, components and/or combinations thereof. The terms “connect”, “connects”, “connecting” and/or “connected” used herein cover the direct and/or indirect connection between two elements. It should be noted that two blocks shown in succession in the above figures may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
The present disclosure includes any novel feature or combination of features disclosed herein either explicitly or any generalization thereof. Various modifications and adaptations to the foregoing exemplary embodiments of this disclosure may become apparent to those skilled in the relevant arts in view of the foregoing description, when read in conjunction with the accompanying drawings. However, any and all modifications will still fall within the scope of the non-Limiting and exemplary embodiments of this disclosure.
Claims
1. A method performed by a coprocessor, comprising:
- periodically processing multiple rows of a timer table in a predetermined memory space on a row-by-row basis, to use a time period required for processing the multiple rows as a time granularity for time counting, wherein each of at least one row of the timer table indicates a corresponding session and has multiple parts, each of the multiple parts indicates corresponding one of multiple timers and maintains a counting value as a function of a number of the counted time granularities; and
- performing, for the at least one row, one or more predetermined actions based on the counting values for the multiple timers.
2. The method according to claim 1, wherein the coprocessor is contained in a communication device to cooperate with a central processing unit (CPU), of the communication device.
3. The method according to claim 1-0x 2, wherein the multiple timers comprise:
- a first timer for counting a time interval between successive test messages to be sent from the coprocessor, wherein the test message is used for measuring communication status between the coprocessor and another communication device;
- a second timer for counting a sending period during which a predetermined number of test messages are to be sent from the coprocessor; and
- a third timer for counting a timeout period, wherein a test message can be determined as being lost when a response message in response to the test message is not received within the timeout period after the sending period.
4. The method according to claim 3, wherein processing a row in the at least one row of the timer table comprises one or more of:
- when a first counting value for the first timer in the row does not reach a first predetermined threshold, incrementing the first counting value by one;
- when the first counting value for the first timer in the row reaches the first predetermined threshold, resetting the first counting value to zero, and triggering a second counting value for the second timer in the row to be incremented by one;
- when the second counting value for the second timer in the row reaches a second predetermined threshold, resetting the second counting value to zero, and triggering a third counting value for the third timer in the row to be processed;
- when the third counting value for the third timer in the row does not reach a third predetermined threshold, and not all the response messages in response to the predetermined number of test messages have been received, incrementing the third counting value by one; and
- when the third counting value for the third timer in the row reaches the third predetermined threshold, or all the response messages in response to the predetermined number of test messages have been received, resetting the third counting value to zero.
5. The method according to claim 3, wherein performing, for a row in the at least one row, one or more predetermined actions based on the counting values for the multiple timers comprises one or more of:
- when a first counting value for the first timer in the row reaches a first predetermined threshold, sending a test message to the another communication device;
- when a third counting value for the third timer in the row reaches a third predetermined threshold, or all the response messages in response to the predetermined number of test messages have been received, generating a test report for reporting the measured communication status between the coprocessor and the another communication device;
- when the third counting value for the third timer in the row reaches the third predetermined threshold, sending the test report to a CPU that cooperates with the coprocessor, and reporting an interruption to the CPU.
6. The method according to claim 5, wherein the test message is an Ethernet message having a private message format, wherein the private message format has one or more of following fields:
- a first field indicating that the Ethernet message is a test message;
- a second field indicating one or more sessions related to the Ethernet message;
- a third field indicating how many sessions are contained in the Ethernet message; and
- a fourth field indicating the measured communication status; or
- wherein the test report is sent to the CPU by one of: Ethernet port; and peripheral component interconnect express (PCIe) direct memory access (DMA).
7. (canceled)
8. The method according to claim 3, wherein for a row in the at least one row of the timer table, separate memory spaces are respectively used in two successive reporting periods to store information usable for generating a test report; and
- wherein the reporting period is a combination of the sending period and the timeout period, and the two successive reporting periods overlap with each other by the timeout period of preceding one of the two successive reporting periods.
9. The method according to claim 3, further comprising:
- receiving a configuration from a CPU that cooperates with the coprocessor, wherein the configuration comprises one or more of: the time interval to be counted by the first timer; the predetermined number of the test messages to be sent in the sending period; the timeout period; and a message format of a test report.
10. The method according to claim 1, wherein the predetermined memory space is provided by a random access memory (RAM), of the coprocessor; and
- wherein each of the multiple rows of the timer table is stored in corresponding one address of the RAM.
11. The method according to claim 1, wherein the coprocessor is capable of supporting one or more of:
- Y.1731 loss measurement/delay measurement (LM/DM);
- two-way active measurement protocol (TWAMP); and
- bidirectional forwarding detection (BFD); or
- wherein the coprocessor is implemented as at least one of: field programmable gate array (FPGA); application specific integrated circuit (ASIC); and data processing unit (DPU).
12. (canceled)
13. A coprocessor comprising:
- a predetermined memory space configured to store a timer table;
- a time counting component configured to periodically process multiple rows of the timer table in the predetermined memory space on a row-by-row basis, to use a time period required for processing the multiple rows as a time granularity for time counting, wherein each of at least one row of the timer table indicates a corresponding session and has multiple parts, each of the multiple parts indicates corresponding one of multiple timers and maintains a counting value as a function of a number of the counted time granularities; and
- an action performing component configured to perform, for the at least one row, one or more predetermined actions based on the counting values for the multiple timers.
14. The coprocessor according to claim 13, wherein the coprocessor is contained in a communication device to cooperate with a central processing unit (CPU) of the communication device.
15. The coprocessor according to claim 13, wherein the multiple timers comprise:
- a first timer for counting a time interval between successive test messages to be sent from the coprocessor, wherein the test message is used for measuring communication status between the coprocessor and another communication device;
- a second timer for counting a sending period during which a predetermined number of test messages are to be sent from the coprocessor; and
- a third timer for counting a timeout period, wherein a test message can be determined as being lost when a response message in response to the test message is not received within the timeout period after the sending period.
16. The coprocessor according to claim 15, wherein the time counting component is configured to process a row in the at least one row of the timer table by one or more of:
- when a first counting value for the first timer in the row does not reach a first predetermined threshold, incrementing the first counting value by one;
- when the first counting value for the first timer in the row reaches the first predetermined threshold, resetting the first counting value to zero, and triggering a second counting value for the second timer in the row to be incremented by one;
- when the second counting value for the second timer in the row reaches a second predetermined threshold, resetting the second counting value to zero, and triggering a third counting value for the third timer in the row to be processed;
- when the third counting value for the third timer in the row does not reach a third predetermined threshold, and not all the response messages in response to the predetermined number of test messages have been received, incrementing the third counting value by one; and
- when the third counting value for the third timer in the row reaches the third predetermined threshold, or all the response messages in response to the predetermined number of test messages have been received, resetting the third counting value to zero.
17. The coprocessor according to claim 15, wherein the action performing component is configured to perform, for a row in the at least one row, one or more predetermined actions based on the counting values for the multiple timers by one or more of:
- when a first counting value for the first timer in the row reaches a first predetermined threshold, sending a test message to the another communication device;
- when a third counting value for the third timer in the row reaches a third predetermined threshold, or all the response messages in response to the predetermined number of test messages have been received, generating a test report for reporting the measured communication status between the coprocessor and the another communication device;
- when the third counting value for the third timer in the row reaches the third predetermined threshold, sending the test report to a CPU that cooperates with the coprocessor, and reporting an interruption to the CPU.
18. The coprocessor according to claim 17, wherein the test message is an Ethernet message having a private message format, wherein the private message format has one or more of following fields:
- a first field indicating that the Ethernet message is a test message;
- a second field indicating one or more sessions related to the Ethernet message;
- a third field indicating how many sessions are contained in the Ethernet message; and
- a fourth field indicating the measured communication status; or
- wherein the test report is sent to the CPU by one of: Ethernet port; and peripheral component interconnect express (PCIe) direct memory access (DMA).
19. (canceled)
20. The coprocessor according to claim 15, wherein for a row in the at least one row of the timer table, separate memory spaces are respectively used in two successive reporting periods to store information usable for generating a test report; and
- wherein the reporting period is a combination of the sending period and the timeout period, and the two successive reporting periods overlap with each other by the timeout period of preceding one of the two successive reporting periods.
21. The coprocessor according to claim 15, further comprising:
- a reception component configured to receive a configuration from a CPU that cooperates with the coprocessor wherein the configuration comprises one or more of: the time interval to be counted by the first timer; the predetermined number of the test messages to be sent in the sending period; the timeout period; and a message format of a test report.
22. The coprocessor according to claim 13, wherein the predetermined memory space is provided by a random access memory (RAM) of the coprocessor; and
- wherein each of the multiple rows of the timer table is stored in corresponding one address of the RAM; or
- wherein the coprocessor is capable of supporting one or more of: Y.1731 loss measurement/delay measurement (LM/DM); two-way active measurement protocol (TWAMP); and bidirectional forwarding detection (BFD); or
- wherein the coprocessor is implemented as at least one of: field programmable gate array (FPGA); application specific integrated circuit (ASIC); and data processing unit (DPU).
23-25. (canceled)
Type: Application
Filed: Dec 2, 2022
Publication Date: Jul 16, 2026
Inventors: Tonghai Gao (Beijing), Haitao Fu (Beijing), Zhanhong Xia (Beijing)
Application Number: 19/133,177