Network packet processing apparatus and network packet processing method
Patent Information
- Application Number
- TW114130674
- Authority / Receiving Office
- TW · TW
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2025-07-28
- Filing Date
- 2025-08-12
- Publication Date
- 2026-10-01
- Estimated Expiration
- 2045-08-11
Smart Images

Figure TWG2TB001913991_001 
Figure TWG2TB001913991_002 
Figure TWG2TB001913991_003
Abstract
Claims
1. A network packet processing device, comprising: a hardware acceleration forwarding circuit for receiving a first packet and processing the first packet to generate a packet to be forwarded; And a network processor for receiving the packet to be forwarded from the hardware acceleration forwarding circuit, segmenting the packet to be forwarded according to a maximum transmission unit value to generate a plurality of fragment packets, and transmitting the plurality of fragment packets to the hardware acceleration forwarding circuit, wherein the network processor segments the packet to be forwarded to generate the plurality of fragment packets without the intervention of the central processing unit; The hardware acceleration forwarding circuit is also used to forward the plurality of segment packets.
2. The network packet processing apparatus as described in claim 1, further comprising: a central processing unit; wherein the hardware acceleration forwarding circuit is further configured to receive a second packet and transmit the second packet to the central processing unit; the central processing unit is configured to process the forwarding of the second packet and write the maximum transmission unit value corresponding to the forwarding of the second packet to the hardware acceleration forwarding circuit; and the hardware acceleration forwarding circuit further reads the maximum transmission unit value according to the first packet and transmits the maximum transmission unit value to the network processor along with the packet to be forwarded.
3. The network packet processing apparatus as described in claim 2, wherein the hardware acceleration forwarding circuit is further used to compare the packet length of the packet to be forwarded with the maximum transmission unit value, and when the packet length exceeds the maximum transmission unit value, to transmit the packet to be forwarded and the maximum transmission unit value together to the network processor.
4. The network packet processing apparatus as described in claim 1, wherein the hardware acceleration forwarding circuit is further configured to set a packet type flag to indicate that the packet type of the packet to be forwarded is to be segmented, and transmit the packet type flag to the network processor along with the packet to be forwarded; and the network processor is further configured to check the packet type flag and determine to segment the packet to be forwarded based on the packet type flag.
5. The network packet processing apparatus as described in claim 1, wherein during the segmentation of the packet to be forwarded, the network processor reuses the header content of the packet to be forwarded and does not copy the payload data content of the packet to be forwarded.
6. The network packet processing apparatus as described in claim 5, wherein the plurality of fragment packets includes a fragment packet, and the network processor is further configured to modify a total length field in one Internet Protocol header of the fragment packet and set a further fragment flag in the Internet Protocol header of the fragment packet.
7. The network packet processing apparatus as described in claim 5, wherein the plurality of fragment packets include a fragment packet, and the network processor is further configured to modify a total length field and a fragment offset field in an Internet Protocol header of the fragment packet.
8. The network packet processing apparatus as claimed in claim 1, wherein the hardware acceleration forwarding circuit is further configured to calculate a checksum for each of the plurality of fragment packets and write the checksum to a checksum field in an Internet Protocol header of each fragment packet.
9. A network packet processing method, comprising: receiving a first packet via a hardware acceleration forwarding circuit and processing the first packet to generate a packet to be forwarded; receiving the packet to be forwarded from the hardware acceleration forwarding circuit via a network processor, segmenting the packet to be forwarded according to a maximum transmission unit value to generate a plurality of fragment packets, and transmitting the plurality of fragment packets to the hardware acceleration forwarding circuit, wherein the network processor segments the packet to be forwarded to generate the plurality of fragment packets without the intervention of a central processing unit; and forwarding the plurality of fragment packets via the hardware acceleration forwarding circuit.
10. The network packet processing method as described in claim 9, further comprising: receiving a second packet through the hardware acceleration forwarding circuit and transmitting the second packet to a central processing unit; processing the forwarding of the second packet through the central processing unit and writing the maximum transmission unit value corresponding to the forwarding of the second packet to the hardware acceleration forwarding circuit; and reading the maximum transmission unit value according to the first packet through the hardware acceleration forwarding circuit, and transmitting the packet to be forwarded and the maximum transmission unit value together to the network processor.
11. The network packet processing method as described in claim 10, wherein the step of transmitting the packet to be forwarded and the maximum transmission unit value together to the network processor comprises: comparing a packet length of the packet to be forwarded with the maximum transmission unit value; and when the packet length exceeds the maximum transmission unit value, transmitting the packet to be forwarded and the maximum transmission unit value together to the network processor.
12. The network packet processing method as described in claim 9, further comprising: setting a packet type flag through the hardware acceleration forwarding circuit to indicate that the packet type of the packet to be forwarded is to be segmented, and transmitting the packet to be forwarded and the packet type flag together to the network processor; wherein the step of segmenting the packet to be forwarded according to the maximum transmission unit value to generate the plurality of fragment packets comprises: checking the packet type flag, and determining to segment the packet to be forwarded according to the packet type flag.
13. The network packet processing method as described in claim 9, wherein during the segmentation of the packet to be forwarded, the network processor reuses the header content of the packet to be forwarded and does not copy the payload data content of the packet to be forwarded.
14. The network packet processing method as described in claim 13, wherein the plurality of fragment packets comprises a fragment packet, and the step of segmenting the packet to be forwarded according to the maximum transmission unit value to generate the plurality of fragment packets comprises: modifying a total length field in an Internet Protocol header of one of the fragment packets, and setting a more fragment flag in the Internet Protocol header of the fragment packet.
15. The network packet processing method as described in claim 13, wherein the plurality of fragment packets includes a fragment packet, and the step of segmenting the packet to be forwarded according to the maximum transmission unit value to generate the plurality of fragment packets includes: modifying a total length field and a fragment offset field in one Internet Protocol header of the fragment packet.
16. The network packet processing method as described in claim 9, wherein forwarding the plurality of fragment packets via the hardware acceleration forwarding circuit comprises: calculating a checksum for each fragment packet in the plurality of fragment packets, and writing the checksum to a checksum field in an Internet Protocol header of each fragment packet.
Citation Information
Patent Citations
Method and device for processing fragmented messages
CN107404446A
Network processor
TWI455531B
