Network device and network speed measurement method

By offloading the information packet generation work of the processor through the hardware acceleration circuit, the problem that the processor with limited computing power cannot meet the requirements of high-speed network speed measurement is solved, and efficient network speed measurement is achieved.

CN120658659APending Publication Date: 2025-09-16AIROHA TECH (SUZHOU) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410263548.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-08
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Processors with limited computing power consume a lot of resources when generating UDP packets, resulting in an inability to meet the requirements of high-speed network speed testing.

Method used

The packet generation work of the processor is offloaded through the hardware acceleration circuit, and multiple UDP packets are generated by the hardware acceleration circuit to meet the network speed measurement requirements.

Benefits of technology

It reduces the burden on the processor, improves the efficiency and accuracy of network speed measurement, and meets the needs of high-speed network speed measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120658659A_ABST
    Figure CN120658659A_ABST
Patent Text Reader

Abstract

The invention provides a network device. The network device comprises a storage device, a processor and a hardware acceleration circuit, the storage device is used for storing program codes. The processor is configured to load and execute the program code to calculate at least one transmission parameter during a network speed measurement period. The hardware acceleration circuit is used for providing a hardware acceleration function of packet processing, and during the network speed measurement period, the hardware acceleration circuit is also used for generating a plurality of packets according to the at least one transmission parameter and sending the plurality of packets to another network device for network speed measurement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to network speed measurement, and more particularly to a network device and a related network speed measurement method that uses a hardware acceleration circuit to offload the packet generation work of a processor (especially a processor with limited computing power) to meet the requirements of high-speed network speed measurement. Background Art

[0002] The Transmission Control Protocol (TCP) is a transport layer protocol. Network devices at both ends of TCP can communicate with each other to ensure the accuracy of data transmission and control the transmission rate. For example, TCP uses two mechanisms, acknowledgment and retransmission, to ensure the accuracy and reliability of TCP packets transmitted across the network. Therefore, the overall transmission process is less efficient, but it can ensure that TCP packets are correctly delivered from the sender to the receiver. However, for some applications, such features are not necessary. For example, for network speed measurement applications, the correctness of data content is not actually of concern. As network speeds continue to increase, traditional TCP-based network speed measurement applications may encounter bottlenecks and seriously underestimate the user's actual network speed.

[0003] The User Datagram Protocol (UDP) is another transport layer protocol. Both TCP and UDP are transport layer protocols, and the primary difference between them lies in whether they provide reliable transmission. TCP offers high reliability, while UDP prioritizes efficiency and is indifferent to packet loss. Therefore, UDP-based network speed measurement applications can be used as an alternative to traditional network speed measurement applications. However, for network devices using processors with limited computing power, having the processor responsible for generating each UDP packet required for uplink speed measurement consumes significant processor and memory resources. Even if the uplink speed measurement task can fully occupy the processor's operating time, the processor's limited computing power means that the maximum network speed that can be measured by the uplink speed measurement will still be far lower than the actual network speed, thus failing to meet the demand for high-speed network speed measurement. Summary of the Invention

[0004] One of the objectives of the present invention is to provide a network device and a related network speed measurement method that uses a hardware acceleration circuit to offload the information packet generation work of a processor (especially a processor with limited computing power) to meet the high-speed network speed measurement requirements.

[0005] In one embodiment of the present invention, a network device is disclosed. The network device includes a storage device, a processor, and a hardware acceleration circuit. The storage device is configured to store program code. The processor is configured to load and execute the program code to perform the following operations: during a network speed measurement, calculate at least one transmission parameter. The hardware acceleration circuit is configured to provide hardware acceleration for packet processing. During the network speed measurement, the hardware acceleration circuit is further configured to independently generate multiple packets based on the at least one transmission parameter and transmit the multiple packets to another network device to perform the network speed measurement.

[0006] In one embodiment of the present invention, a network speed measurement method is disclosed. The method includes: executing program code to calculate at least one transmission parameter; and using a hardware acceleration circuit having a hardware acceleration function for packet processing to generate multiple packets based on the at least one transmission parameter and sending the multiple packets to another network device to perform network speed measurement.

[0007] The processor's packet generation work is quite resource-intensive. When the processor's computing power is limited, the processor may not be able to generate enough packets within the required time to test the actual network speed. To solve this problem, the network device of the present invention can offload the processor's packet generation work through a hardware acceleration circuit to meet the requirements of high-speed network speed testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 FIG. 1 is a schematic diagram of a network device according to an embodiment of the present invention.

[0009] Figure 2 Schematic diagram of information packet exchange between the sender and receiver based on the TR-471 speed measurement protocol.

[0010] Figure 3 A schematic diagram of the information packet format that complies with the TR-471 speed measurement protocol.

[0011]

Explanation of symbols

[0012] 100,102: Network device

[0013] 101: Wide Area Network

[0014] 112: Storage device

[0015] 114: Processor

[0016] 116:Hardware acceleration circuit

[0017] 118:Linux kernel module

[0018] 120: Information packet sending driver module

[0019] 122: Information packet generation circuit

[0020] 124: Speed ​​limiting circuit

[0021] 126,PKT_1: Information Packet

[0022] 128: First-in-first-out buffer

[0023] 130: Send ring buffer

[0024] 202: Payload Protocol Data Unit

[0025] 204: Status Feedback Protocol Data Unit

[0026] PROG: Program code

[0027] L-PDU: Load Protocol Data Unit DETAILED DESCRIPTION

[0028] Certain words are used in the specification and claims to refer to specific components. It should be understood by those with ordinary skill in the art that hardware manufacturers may use different terms to refer to the same component. This specification and claims do not use differences in name as a way to distinguish components, but rather use differences in the functions of the components as the criteria for distinction. The words "include" and "including" mentioned throughout the specification and claims are open-ended terms and should be interpreted as "including but not limited to". In addition, the word "couple" or "coupled" herein includes any direct and indirect electrical connection means. Therefore, if the text describes a first device coupled to a second device, it means that the first device can be directly electrically connected to the second device, or indirectly electrically connected to the second device through other devices and connection means.

[0029] Figure 1 This is a schematic diagram of a network device according to an embodiment of the present invention. The network device 100 can exchange data with another network device 102 via a wide area network (WAN) 101. For example, the network device 100 can act as a client, and the network device 102 can act as a server. Therefore, the network device 100 can perform uplink network speed measurement by sending information packets to the network device 102. In this embodiment, the network device 100 can be an optical network unit (ONU), but the present invention is not limited thereto. Any network device that adopts the network speed measurement solution of the present invention falls within the scope of the present invention. The network device 100 includes a storage device 112, a processor 114, and a hardware acceleration circuit 116. Please note that Figure 1Only components relevant to the present invention are shown. In practice, network device 100 may include other components to implement other functions. Storage device 112 can be a memory or any other device with data storage capabilities, and is used to store program code PROG. For example, program code PROG can include program code for an operating system (OS). In this embodiment, program code PROG can include multiple software modules, including (but not limited to) a Linux kernel module 118 and a packet sending driver module 120. Processor 114 is used to load and execute program code PROG to control the operation of network device (e.g., client) 100. For example, processor 114 can be a general-purpose processor, and Linux kernel module 118 supports the TR-471 speed measurement protocol (a UDP-based speed measurement protocol). Therefore, processor 114 can execute program code PROG (including Linux kernel module 118 and packet sending driver module 120) to perform software control-related operations in the network speed measurement solution of the present invention.

[0030] In this embodiment, during the network speed test, the processor 114 executes the program code PROG (particularly the Linux kernel module 118) to calculate at least one transmission parameter. For example, the processor 114 calculates a plurality of transmission parameters P1 and P2 and provides the plurality of transmission parameters P1 and P2 to the hardware acceleration circuit 116. The transmission parameter P1 may be a sending rate (in bits per second (bps)) and the transmission parameter P2 may be a data volume (in bytes).

[0031] In addition, the network device 100 itself includes a hardware acceleration circuit 116 for providing hardware acceleration for packet processing. For example, the hardware acceleration circuit 116 can provide hardware accelerated network address translation (HWNAT) functionality. In this embodiment, the hardware acceleration circuit 116 is a purely hardware-implemented functional block and can additionally support the hardware operations required by the network speed measurement solution of the present invention. For example, the hardware acceleration circuit 116 includes a packet generator circuit 122 and a rate limiter circuit 124. During the network speed test, the hardware acceleration circuit 116 is further configured to generate a plurality of information packets 126 based on the transmission parameters (e.g., P1, P2) provided by the processor 114 and send the plurality of information packets 126 to another network device (e.g., server) 102 to perform network speed test (e.g., uplink network speed test). Each information packet 126 may be a UDP information packet (i.e., an information packet using the UDP protocol at the transport layer), including a UDP header and a UDP payload. In addition, each information packet 126 carries a load protocol data unit (Load PDU) in accordance with the packet format of the TR-471 speed test protocol, such as Figure 1 As shown, the UDP payload data of the UDP packet includes a payload protocol data unit (L-PDU). Furthermore, multiple packets 126 are sequentially written to a first-in first-out buffer (FIFO buffer) 128 within the packet generation circuit 122. The FIFO buffer 128 then sequentially outputs the multiple packets 126 to the rate limiting circuit 124 for subsequent packet transmission. Please note that packets can have different names at different layers of the network architecture. In the embodiment of the present invention, each packet 126 carries a payload protocol data unit (PDU) that complies with the TR-471 speed measurement protocol. Furthermore, the packet 126 utilizes the UDP protocol at the transport layer.

[0032] In this embodiment, the processor 114 is a processor with limited computing power, such as an ARM processor operating at 1.2 gigahertz (GHz). Since the packet generation work of the processor 114 is quite resource-intensive, the processor 114 cannot generate enough packets within the required time to test the actual network speed. To address this problem, the network device 100 of the present invention can offload the packet generation work of the processor 114 through the hardware acceleration circuit 116 to meet the requirements of high-speed network speed measurement. Further details of the network speed measurement solution of the present invention are described below.

[0033] As mentioned above, the Linux kernel module 118 supports the TR-471 speed measurement protocol (which is a UDP-based speed measurement protocol). According to the TR-471 speed measurement protocol, when performing an uplink network speed measurement, the network device (client) 100 acts as a sender, and the other network device (server) 102 acts as a receiver. Figure 2 , Figure 2 Figure 1 is a diagram illustrating packet exchange between a transmitter and a receiver according to the TR-471 speed measurement protocol. During each trial interval (TI), a network device (transmitter) 100 transmits multiple payload PDUs 202 at a transmission rate configured for that TI. Furthermore, the network device (receiver) 102 parses each received payload PDU 202 to calculate information such as drop counts, out-of-order packets, and round-trip time (RTT). At the end of each TI, this statistical information is written to a Status Feedback PDU 204 and reported back to the network device (transmitter) 100. The network device (transmitter) 100 then dynamically adjusts the transmission rate for the next TI based on this statistical information carried in the Status Feedback PDU 204.

[0034] In this embodiment, the program code executed by the processor 114 (e.g., the Linux kernel module 118) parses the status feedback protocol data unit 204 reported by the network device (receiver) 102 and calculates the transmission parameters (e.g., P1 and P2) for the next TI based on the statistical information carried in the status feedback protocol data unit 204. Assuming that each TI lasts 10 milliseconds (ms) and the program code executed by the processor 114 (e.g., the Linux kernel module 118) calculates a transmission rate of 8 Gbps for the next TI, the total amount of data to be transmitted in the next TI can be calculated as 10 megabytes (MB) based on the product of the TI length (10 ms) and the calculated transmission rate (8 Gbps) (8 Gbps*10 ms). The processor 114 informs the hardware acceleration circuit 116 of the transmission parameter P1 (e.g., transmission rate = 8 Gbps) and the transmission parameter P2 (e.g., a portion of the total data volume 10 MB, such as the maximum UDP payload data volume of 64 kilobytes (KB) supported by the TR-471 speed measurement protocol. However, this is only an example. In other embodiments, the transmission parameter P2 may also use other values). In this embodiment, the transmission parameter P1 (e.g., transmission rate = 8 Gbps) is informed to the rate limiting circuit 124, and the transmission parameter P2 (e.g., 64 KB) is informed to the packet generation circuit 122.

[0035] Based on the data size indicated by the transmission parameter P2 (e.g., 64 KB), the packet generation circuit 122 determines how many packets (UDP packets) 126 must be generated and transmitted to transmit the data size (e.g., 64 KB) requested by the processor 114 from the network device 100 to the other network device 102. The packet generation circuit 122 encapsulates the payload protocol data unit (PDU) (including a load header and payload data) into a UDP packet (including a UDP header and UDP payload data, wherein the UDP payload data includes the payload PDU to be transmitted) at the transport layer. In other words, the plurality of packets 126 have a UDP packet format at the transport layer to comply with the requirements of the TR-471 speed measurement protocol. In this embodiment, each packet generated and transmitted by the packet generation circuit 122 is no larger than the maximum transmission unit (MTU) of the wide area network 101. Assuming the maximum transmission unit is 1024 bytes (MTU = 1KB), the packet length of each packet 126 is set to 1KB, and the transmission parameter P2 set by the processor 114 indicates a data size of 64KB. For ease of explanation, ignoring the number of bits required for the header itself, the number of packets 126 to be sent by the packet generation circuit 122 can be simply estimated to be 64 (i.e., 64KB / 1KB = 64). In addition, the rate limit circuit 124 limits the transmission of the packets 126 generated by the packet generation circuit 122 to the network device (receiver) 102 at the transmission rate indicated by the transmission parameter P1 (e.g., 8Gbps) to perform network speed measurement (i.e., uplink network speed measurement).

[0036] In this embodiment, the program code executed by the processor 114 (e.g., the Linux kernel module 118) will also generate a small amount of information packets (UDP information packets) PKT_1 for each TI. The payload header of the payload protocol data unit carried by each information packet PKT_1 will provide the initial setting value of each field. In addition, the transmission parameter P2 (e.g., 64KB) set by the processor 114 will also be notified to the hardware acceleration circuit 116 (especially the information packet generation circuit 122 in the hardware acceleration circuit 116) through the information packet PKT_1. In other words, the header field (field) in the information packet PKT_1 generated by the processor 114 will indicate the amount of data (e.g., 64KB) that the information packet generation circuit 122 will subsequently assist in self-generation and transmission. According to the TR-471 speed measurement protocol, the payload header of the payload protocol data unit has specific fields, such as Figure 3As shown, the length of the "udpPayload" field is 16 bits, which can be used to indicate the payload data volume of the UDP packet (the UDP payload data will include the payload header and payload data of the payload protocol data unit). Therefore, the maximum payload data volume of the UDP packet that can be indicated by the 16-bit "udpPayload" field is 64KB. In this embodiment, the processor 114 can inform the hardware acceleration circuit 116 (especially the packet generation circuit 122 in the hardware acceleration circuit 116) of the transmission parameter P2 (for example, 64KB) by setting the "udpPayload" field in the packet PKT_1 that complies with the TR-471 speed measurement protocol.

[0037] As previously described, assuming that the length of each TI is 10 ms and the program code executed by the processor 114 (e.g., the Linux kernel module 118) calculates a transmission rate of 8 Gbps for the next TI, the total amount of data to be transmitted in the next TI is 10 MB. When the "udpPayload" field in the packet PKT_1 generated by the processor 114 indicates a data amount of 64 KB, the packet generation circuit 122 sends multiple packets 126 (e.g., the packet length of each packet 126 may be equal to the maximum transmission unit of the network) in response to the 64 KB data amount indicated by the packet PKT_1, thereby transmitting 64 KB of data to the network device 102. Since the total amount of data to be sent in the next TI is 10MB and the amount of data indicated by the "udpPayload" field in the information packet PKT_1 generated by the processor 114 is 64KB (64KB<10MB), the number of information packets PKT_1 to be sent by the program code executed by the processor 114 (such as the Linux kernel module 118) in the next TI is at least 157. For a traditional network device that does not adopt the network speed measurement solution of the present invention, if the packet length of each information packet is equal to the maximum transmission unit of the network (for example, MTU = 1KB), the number of information packets that the processor needs to generate and send in the next TI is 10MB / 1KB. However, for the network device 100 that adopts the network speed measurement solution of the present invention, the number of information packets that the processor 114 needs to generate and send in the next TI (that is, the number of information packets PKT_1 provided to the information packet generation circuit 122) will be greatly reduced to 10MB / 64KB. Since the processor 114 generates these small amounts of information packets PKT_1 and does not consume a large amount of processor resources and memory resources, the processor 114 with limited computing power can meet the requirements of uplink network speed measurement.

[0038] According to the TR-471 speed measurement protocol, the payload header of the payload protocol data unit has Figure 3Therefore, when the packet generating circuit 122 generates the packet 126 , it is necessary to fill the correct information into each field of the payload header. The program code executed by the processor 114 (e.g., the Linux kernel module 118) generates a small number of packets PKT_1 for each TI. The payload header of the payload protocol data unit carried by each packet PKT_1 provides initial settings for various fields. Therefore, the Linux kernel module 118 writes the packet descriptor of the packet PKT_1 to the transmit ring buffer 130 through the packet transmission driver module 120. The packet descriptor of the packet PKT_1 records information regarding the actual storage address of the packet PKT_1 in the memory. In this way, the packet generation circuit 122 can subsequently read the packet descriptor of the packet PKT_1 from the transmit ring buffer 130 and, based on the storage address information provided by the packet descriptor, retrieve the packet PKT_1 generated by the processor 114 from the memory via direct memory access (DMA), thereby obtaining the header content provided by the processor 114.

[0039] The information packet (UDP information packet) PKT_1 generated by the processor 114 is mainly used to provide the initial setting value of each field in the payload header of the payload protocol data unit (including the UDP payload data amount indicated by the transmission parameter P2). Therefore, the data length itself is not concerned. Specifically, according to the network speed measurement solution of the present invention, the actual information packet transmission between the network devices 100 and 102 is mainly generated by the information packet generation circuit 122 to generate multiple information packets with the data amount required by the transmission parameter P2. Therefore, the actual UDP payload data of the information packet PKT_1 generated by the processor 114 can be very small. For example, For example, the data volume indicated by the "udpPayload" field in the information packet PKT_1 provided by the processor 114 is 64KB. However, the actual payload data carried by the information packet PKT_1 itself can be very small, for example, only 10 bytes. In other words, the UDP payload data of the information packet (UDP information packet) PKT_1 will be much smaller than the data volume of 64KB indicated by the "udpPayload" field. Since the actual payload data carried by the information packet PKT_1 itself is very small, the processor 114 does not consume a large amount of processor resources and memory resources when generating each information packet PKT_1.

[0040] In summary, for the network device 100 adopting the network speed measurement solution of the present invention, the number of information packets that the processor 114 needs to generate and send in the next TI (i.e., the number of information packets PKT_1 provided to the information packet generation circuit 122) can be greatly reduced. In addition, the actual payload data carried by the information packet PKT_1 itself can also be greatly reduced. In this way, during the network speed measurement, the burden of information packet generation work on the processor 114 can be greatly reduced, thereby enabling the processor 114 with limited computing power to meet the requirements of uplink network speed measurement.

[0041] In this embodiment, network device 100 offloads packet generation from processor 114 to packet generation circuit 122. Specifically, packet generation circuit 122 generates multiple packets (UDP packets) 126 that meet the required data volume (i.e., the data volume indicated by the "udpPayload" field of packet PKT_1) based on each packet (UDP packet) PKT_1 provided by processor 114. In this embodiment, each packet in multiple packets 126 is no larger than the maximum transmission unit (MTU) of wide area network 101. Regarding packet generation, packet generation circuit 122 copies packet PKT_1 and performs corresponding header field modifications (including modifications to the UDP header field of the UDP packet and the payload header field of the payload protocol data unit) to generate each packet in multiple packets 126. For example, for the first information packet 126 generated and sent by the same information packet PKT_1, the contents of fields such as "loadID", "tAction", "rxStop", "lpduSeqNo", "spduTime_sec", "spduTime_nsec", "lpduTime_sec" and "lpduTime_nsec" in the payload header of the payload protocol data unit can directly inherit the contents of the corresponding fields in the information packet PKT_1 provided by the processor 114. In addition, the payload data volume of the payload protocol data unit will be set according to the maximum transmission unit of the network. Therefore, the "udpPayload" field in the payload header of the payload protocol data unit needs to be filled in with the corresponding correct value based on the actual data volume, rather than directly inheriting the content of the same field in the information packet PKT_1 provided by the processor 114.

[0042] For the second information packet 126 generated and sent by the same information packet PKT_1, the payload data volume of the payload protocol data unit will be set according to the maximum transmission unit of the network. In addition, in addition to the "udpPayload" field in the payload header of the payload protocol data unit needing to be filled with the corresponding correct value based on the actual data volume, the contents of fields such as "lpduSeqNo", "lpduTime_sec" and "lpduTime_nsec" in the payload header of the payload protocol data unit also need to be appropriately updated to reflect the correct values, rather than directly inheriting the contents of the same field in the information packet PKT_1 provided by the processor 114. According to the TR-471 speed measurement protocol, the "lpduSeqNo" field is used to record the sequence number of the payload protocol data unit. Therefore, the packet generation circuit 122 will calculate the sequence number of the payload protocol data unit of the second information packet based on the sequence number of the payload protocol data unit of the first information packet (which will be equal to the sequence number of the payload protocol data unit of the information packet PKT_1 provided by the processor 114) and fill the correct value into the "lpduSeqNo" field. In addition, according to the TR-471 speed measurement protocol, the "lpduTime_sec" field and the "lpduTime_nsec" field are used to record the send time of this payload protocol data unit. Therefore, the packet generation circuit 122 will calculate the send time of the payload protocol data unit of the second information packet based on the send time of the payload protocol data unit of the first information packet (which is equal to the send time of the payload protocol data unit of the information packet PKT_1 provided by the processor 114) and the time actually consumed by the first information packet to be sent, and fill the correct values ​​into the "lpduTime_sec" field and the "lpduTime_nsec" field.

[0043] Similarly, subsequent packets also undergo header field content modification. For example, for the nth packet 126 (n>2) generated and sent in response to the same packet PKT_1, the payload PDU's payload data size is set based on the network's maximum transmission unit (MTU). Furthermore, not only is the "udpPayload" field in the PDU's payload header filled with the correct value based on the actual data size, but the "lpduSeqNo," "lpduTime_sec," and "lpduTime_nsec" fields in the PDU's payload header are also updated to reflect the correct values. The packet generation circuit 122 calculates the sequence number of the nth packet's payload PDU based on the sequence number of the first packet's payload PDU (i.e., the sequence number of the payload PDU of packet PKT_1) and enters the correct value into the "lpduSeqNo" field. In addition, the packet generation circuit 122 calculates the sending time of the payload protocol data unit of the nth packet based on the sending time of the payload protocol data unit of the first packet (i.e., the sending time of the payload protocol data unit of packet PKT_1) and the time consumed for the actual sending of the subsequent (n-2) packets, and fills the correct values ​​into the "lpduTime_sec" field and the "lpduTime_nsec" field.

[0044] For network speed measurement applications, the correctness of the data content is actually not a concern. Therefore, for the information packet 126 generated by the information packet generation circuit 122 itself, the payload data of the payload protocol data unit can be randomly filled in by the information packet generation circuit 122. For example, the information packet generation circuit 122 can read any data from the internal memory (such as static random access memory) as the payload data of the payload protocol data unit.

[0045] In addition, for the multiple packets 126 generated by the packet generation circuit 122, since the contents of the packets are not exactly the same, the packet generation circuit 122 also needs to recalculate the checksum for each of the multiple packets 126 and fill in the "checksum" field in the UDP header.

[0046] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the claims of the present invention should fall within the scope of the present invention.

Claims

1. A network device comprising: a storage device for storing program code; A processor, configured to load and execute the program code to perform the following operations: During a network speed test, calculating at least one transmission parameter; and A hardware acceleration circuit is used to provide a hardware acceleration function for information packet processing. During the network speed test, the hardware acceleration circuit is further used to generate multiple information packets based on the at least one transmission parameter and send the multiple information packets to another network device to perform network speed test.

2. The network device of claim 1, wherein each of the plurality of packets is a User Datagram Protocol packet.

3. The network device as claimed in claim 2, wherein the network speed measurement adopts TR-471 speed measurement protocol. The network device as claimed in claim 1 , wherein the at least one transmission parameter comprises a sending rate.

5. The network device as claimed in claim 4, wherein the hardware acceleration circuit comprises: A rate limiting circuit is used for limiting the sending rate of the plurality of information packets to the other network device. The network device as claimed in claim 1 , wherein the at least one transmission parameter comprises a data volume.

7. The network device of claim 6, wherein the processor further executes the program code to perform the following operations: generating an information packet and writing a packet descriptor of the information packet into a sending ring buffer, wherein a header field in the information packet indicates the data amount; The hardware acceleration circuit reads the information packet through the sending ring buffer and determines the number of the plurality of information packets according to the data amount indicated by the header field.

8. The network device of claim 7, wherein the data amount indicated by the header field is larger than a maximum transmission unit of a network, and the payload data of the packet is smaller than the data amount indicated by the header field.

9. The network device of claim 7, wherein the packet generating circuit copies the packet and performs header field content modification to generate each of the plurality of packets separately.

10. The network device as claimed in claim 1, wherein the network device is an optical network unit.

11. A network speed measurement method, comprising: executing program code to calculate at least one transmission parameter; and A hardware acceleration circuit with a hardware acceleration function for information packet processing is used to automatically generate a plurality of information packets according to the at least one transmission parameter and send the plurality of information packets to another network device to perform network speed measurement.

12. The network speed measurement method as claimed in claim 11, wherein each of the plurality of information packets is a User Datagram Protocol (UDP) packet.

13. The network speed measurement method according to claim 12, wherein the network speed measurement adopts TR-471 speed measurement protocol.

14. The network speed measurement method according to claim 11, wherein the at least one transmission parameter comprises a sending rate.

15. The network speed measurement method according to claim 14, wherein the step of automatically generating the plurality of information packets according to the at least one transmission parameter and sending the plurality of information packets to the other network device to perform the network speed measurement comprises: The plurality of information packets are sent to the other network device at a limited sending rate.

16. The network speed measurement method according to claim 11, wherein the at least one transmission parameter comprises a data volume.

17. The network speed measurement method according to claim 16, further comprising: executing the program code to generate an information packet and write a packet descriptor of the information packet into a sending ring buffer, wherein a header field in the information packet indicates the data amount; The step of automatically generating the plurality of information packets according to the at least one transmission parameter and sending the plurality of information packets to the other network device to perform the network speed measurement comprises: reading the information packet through the transmit ring buffer; and The number of the plurality of information packets is determined according to the data amount indicated by the header field.

18. The network speed measurement method as claimed in claim 17, wherein the data amount indicated by the header field is larger than the maximum transmission unit of the network, and the payload data of the information packet is smaller than the data amount indicated by the header field.

19. The network speed measurement method of claim 17, wherein the step of automatically generating the plurality of information packets according to the at least one transmission parameter and sending the plurality of information packets to the other network device to perform the network speed measurement further comprises: The information packet is copied and header field content modification is performed to generate each information packet in the plurality of information packets.

20. The network speed measurement method according to claim 11, wherein the network speed measurement method is performed by an optical network unit.