CN106789730B - Method and device for processing fragment message - Google Patents

Method and device for processing fragment message Download PDF

Info

Publication number
CN106789730B
CN106789730B CN201611250019.7A CN201611250019A CN106789730B CN 106789730 B CN106789730 B CN 106789730B CN 201611250019 A CN201611250019 A CN 201611250019A CN 106789730 B CN106789730 B CN 106789730B
Authority
CN
China
Prior art keywords
fragment
message
header
fragmented
sent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611250019.7A
Other languages
Chinese (zh)
Other versions
CN106789730A (en
Inventor
袁野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201611250019.7A priority Critical patent/CN106789730B/en
Publication of CN106789730A publication Critical patent/CN106789730A/en
Application granted granted Critical
Publication of CN106789730B publication Critical patent/CN106789730B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9005Buffering arrangements using dynamic buffer space allocation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a method and a device for processing a fragmented message, wherein the method is applied to network equipment and comprises the following steps: respectively storing the received fragment messages to corresponding cache regions; the cache region comprises a header region and a data region; based on the fragment offset recorded in the header area of each fragment message, orderly linking the addresses of the data area of each fragment message into a corresponding logical linked list; and performing corresponding service processing on each fragment message based on the logic linked list, and after the processing is completed, sequentially forwarding each fragment message to the next-stage network equipment based on the logic linked list. By using the method provided by the application, the device performance of the network device can be effectively improved by reducing the copy times of the fragment message.

Description

Method and device for processing fragment message
Technical Field
The present application relates to the field of computer communications, and in particular, to a method and an apparatus for processing a fragmented packet.
Background
The IP packet fragmentation technique is a commonly used technical means for transmitting IP packets on a network. Generally, when the size of an IP packet sent by a sending end exceeds an MTU (Maximum Transmission Unit), fragmentation processing may be performed on the IP packet to be sent, and then the fragmented packet is sent to a receiving end, and the receiving end performs corresponding IP packet reassembly.
However, with the rapid development of the internet, the performance of the network device is also seriously examined, and the processing capability of the fragmented packet is an important index for measuring the performance of the network device, so how to improve the processing efficiency of the fragmented packet of the network device becomes a problem to be solved urgently.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for processing a fragmented packet, so as to improve the device performance of a network device by reducing the copy frequency of the fragmented packet.
Specifically, the method is realized through the following technical scheme:
according to a first aspect of the present application, a method for processing a fragmented packet is provided, where the method is applied to a network device, and the method includes:
respectively storing the received fragment messages to corresponding cache regions; the cache region comprises a header region and a data region;
based on the fragment offset recorded in the header area of each fragment message, orderly linking the addresses of the data area of each fragment message into a corresponding logical linked list;
and performing corresponding service processing on each fragment message based on the logic linked list, and after the processing is completed, sequentially forwarding each fragment message to the next-stage network equipment based on the logic linked list.
According to a second aspect of the present application, there is provided an apparatus for processing a fragmented packet, where the apparatus is applied to a network device, and the apparatus includes:
the storage unit is used for respectively storing the received fragment messages to corresponding cache regions; the cache region comprises a header region and a data region;
the recombination unit is used for orderly linking the addresses of the data areas of the fragment messages into corresponding logic linked lists based on the fragment offset recorded by the header areas of the fragment messages;
and the sending unit is used for carrying out corresponding service processing on each fragment message based on the logic linked list, and sequentially forwarding each fragment message to the next-stage network equipment based on the logic linked list after the processing is finished.
The application provides a method for processing fragmented messages, wherein network equipment can respectively store received fragmented messages to corresponding cache regions; the buffer area comprises a header area and a data area. And the addresses of the data areas of the fragment messages can be orderly linked into corresponding logical linked lists based on the fragment offset recorded in the header area of each fragment message. The network device may perform corresponding service processing on each fragmented packet based on the logical linked list, and sequentially forward each fragmented packet to the next-stage network device based on the logical linked list after the processing is completed.
When the fragment messages are recombined, because the network device does not copy the fragment messages stored in the cache region to the continuous physical memory in order any more, the addresses of the data regions of the fragment messages can be linked to the corresponding logical linked lists in order based on the fragment offset recorded by the header region of each fragment message, and the fragment messages in the cache region are recombined to the logical original messages, thereby effectively reducing the copying times. Therefore, the performance of the equipment can be effectively improved, and the time delay of message forwarding is reduced.
Drawings
Fig. 1 is a schematic diagram illustrating a mapping format of a fragmentation message in a cache area of a receiving-side network device according to the present application;
fig. 2 is a schematic diagram of a fragmentation message reassembly method in the related art shown in this application;
fig. 3 is a flowchart illustrating a method for processing a fragmented packet according to an exemplary embodiment of the present application;
fig. 4 is a schematic diagram illustrating a method for reassembling a fragmented packet according to an exemplary embodiment of the present application;
fig. 5 is a hardware structure diagram of a device in which a fragmentation message processing apparatus according to an exemplary embodiment of the present application is located;
fig. 6 is a block diagram of a device for processing a fragmented packet according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
With the rapid development of the internet, the performance of the network device is also subject to severe examination, and the processing capability of the fragmented packet is an important index for measuring the performance of the network device.
Generally, when the size of an original message sent by a sending-side network device exceeds an MTU (maximum transmission Unit), fragmentation processing may be performed on the original message to be sent, then a fragmentation offset of each fragmentation message is written into a header of the fragmentation message, and then the fragmentation messages are sequentially sent to a receiving-side network device, and the receiving-side network device performs corresponding fragmentation message reassembly.
When receiving the fragment message, the network device of the receiving party may cache the fragment message in the cache region. Referring to fig. 1, fig. 1 is a schematic diagram illustrating a mapping format of a fragmentation message in a cache area of a receiving side network device according to the present application.
In general, the network device on the receiving side may write the header of the received fragment packet and the address of the buffer (i.e., data area) where the fragment packet data is located into the SKB, and write the data of the fragment packet into the buffer (i.e., data area) corresponding to the address of the buffer recorded by the SKB.
After the original message is fragmented, each fragmented message has its own header and is independent from other fragmented messages when routing is selected. Therefore, when the fragment messages reach the receiving-side network device, a problem of disorder may occur, in other words, the sequence of the fragment messages cached in the cache area of the receiving-side network device is not the sequence of the fragment messages in the original message.
For example, the sending-side network device splits the original message into a first, a second, and an nth fragment messages, and sends the first, the second, and the nth fragment messages to the receiving-side network device in sequence.
However, since the selected route of each fragmented packet is different and the link quality is different, the order of the fragmented packets received by the network device of the receiving party is not the order of the first, second to nth fragmented packets, for example, the order of the fragmented packets received by the receiving party may be the first, fourth, third, second fragmented packet, and so on.
Therefore, the receiving-side network device needs to reassemble the received fragment packet to re-compose the original packet, and then can perform corresponding service processing (such as NAT, protocol depth detection, etc.) on the original packet.
Referring to fig. 2, fig. 2 is a schematic diagram of a related IP packet reassembly method, and fig. 2 is a schematic diagram of a related fragment packet reassembly method according to the present application.
In the scheme of the related fragment packet reassembly, the network device may sequentially copy the data of the fragment packets in the cache area to a segment of continuous physical memory according to the fragment offset of the fragment packet recorded in each fragment packet, so that the complete original packet is stored in the continuous physical memory.
However, in the fragmentation message reassembly technique in the related art, when the fragmentation message is reassembled, the network device on the receiving side needs to copy each fragmentation message from the buffer to the continuous physical memory (this process may also be referred to as memory copy), and since the number of times of memory copy occurs is too many, the performance of the device is seriously affected, and the time delay of message forwarding is greatly increased.
The application provides a method for processing a fragment message, wherein a network device can respectively store received fragment messages to corresponding cache regions, and each cache region comprises a header region and a data region. And the addresses of the data areas of the fragment messages can be orderly linked into corresponding logical linked lists based on the fragment offset recorded in the header area of each fragment message. The network device may perform corresponding service processing on each fragmented packet based on the logical linked list, and sequentially forward each fragmented packet to the next-stage network device based on the logical linked list after the processing is completed.
When the fragment messages are recombined, because the network device does not copy the fragment messages stored in the cache region to the continuous physical memory in order any more, the addresses of the data regions of the fragment messages can be linked to the corresponding logical linked lists in order based on the fragment offset recorded by the header region of each fragment message, and the fragment messages in the cache region are recombined to the logical original messages, thereby effectively reducing the copying times. Therefore, the performance of the equipment can be effectively improved, and the time delay of message forwarding is reduced.
Referring to fig. 3, fig. 3 is a flowchart illustrating a method for processing a fragmented packet according to an exemplary embodiment of the present application; the method is applied to the network equipment, and the method can comprise the following steps:
step 301: respectively storing the received fragment messages to corresponding cache regions; the cache region comprises a header region and a data region;
step 302: based on the fragment offset recorded in the header area of each fragment message, orderly linking the addresses of the data area of each fragment message into a corresponding logical linked list;
step 303: and performing corresponding service processing on each fragment message based on the logic linked list, and after the processing is completed, sequentially forwarding each fragment message to the next-stage network equipment based on the logic linked list.
The header area is an area where the header of the fragment message is stored in the buffer area, and is usually SKB.
The data area refers to an area for storing data of the fragment packet in the cache area.
In the embodiment of the present application, when the fragment messages are reassembled, because the network device does not copy the fragment messages stored in the cache region to the continuous physical memory in an orderly manner, the addresses of the data regions of the fragment messages may be linked to the corresponding logical linked lists in an orderly manner based on the fragment offsets recorded in the header regions of the fragment messages, and the fragment messages in the cache region are reassembled to the logical original messages, so that the number of times of copying may be effectively reduced. Therefore, the performance of the equipment can be effectively improved, and the time delay of message forwarding is reduced.
In implementation, the network device may receive the fragment messages sent by the upper level network device, and sequentially store the received fragment messages in the corresponding cache regions.
During storage, the network device may store the header of each fragment packet in an SKB (i.e., a header area) in the cache area, store the data of each fragment packet in the data area of the cache area, and write the address of the cache area where the data of each fragment packet is located in the SKB corresponding to the fragment packet, as shown in fig. 1.
The network device may determine the position sequence of each packet in the original packet based on the fragment offset recorded in the header area of each received fragment packet, and then sequentially connect the addresses of the data areas of each fragment packet to corresponding logical linked lists, so as to organize each fragment packet in the cache area into logically original packets. As shown in fig. 4.
In an alternative implementation manner, the network device may add a logical linked list pointer pointing to an address of a data area of a next segment packet in a header area of each segment packet.
In implementation, for a first segment packet, the network device may add a logical linked list pointer pointing to an address of a data area of a second segment packet in an SKB (i.e., a header area) of the first segment packet. Then, the network device may add a logical linked list pointer pointing to an address of the data area of the third fragmented packet in the SKB corresponding to the second fragmented packet, and so on until the network device adds a logical linked list pointer pointing to an address of the data area of the nth fragmented packet in the SKB corresponding to the N-1 fragmented packets. The nth fragmentation message is the last fragmentation message, and the network device may determine the last fragmentation message based on a flag bit in a header of the fragmentation message, where N is an integer greater than 1.
In another alternative implementation, the network device may add an address logical linked list pointer pointing to the data area of the next segment packet in the data area of each segment packet.
In implementation, the network device may add a logical linked list pointer pointing to the data area address of the second fragmented packet in the data area of the first fragmented packet. And then, adding a logical linked list pointer pointing to the data area address of the third fragmented packet in the data area of the second fragmented packet, and so on until the network equipment adds a logical linked list pointer pointing to the data area address of the Nth fragmented packet in the data areas of the N-1 fragmented packets. The nth fragmentation message is the last fragmentation message, and the network device may determine the last fragmentation message based on a flag bit in a header of the fragmentation message, where N is an integer greater than 1.
After the above-mentioned reassembly of the fragmented packets by the logical linked list is completed, the network device may perform corresponding service processing on each fragmented packet based on the logical linked list.
Taking the service processing as an example of NAT conversion, the network device may check the address and port in the header of the first fragment message through the SKB, and then complete the conversion based on the NAT conversion policy.
After completing the service processing of the fragmented packet, the network device may sequentially forward each fragmented packet to the next-stage network device based on the logical linked list.
During transmission, the network device may determine the first fragment packet based on the logical linked list, record the header and the payload length of the first fragment packet, and transmit the first fragment packet to the next level network device.
Then, the network device may sequentially select the unsent fragmented messages as the current messages to be sent based on the logical linked list.
For the current message to be sent, the network device may modify the header content of the current fragment message to be sent to the header content of the first fragment message, and may add the fragment offset of the previous fragment message and the payload length of the previous fragment message as the fragment offset of the current fragment message to be sent. The network device may update the value of the fragment offset in the header of the current message to be sent by using the fragment offset of the current message to be sent, which is obtained by accumulation. Meanwhile, the network device can record the fragment offset and the effective load length of the current fragment message to be sent.
After updating and recording the header of the current message to be sent, the network device may send the current fragmented message to be sent to the next-stage network device.
For example, after the network device sends the first fragment packet to the next level of network device, the second fragment packet may be read as the current packet to be sent based on the logical linked list.
The network device may modify the header content of the second fragmented packet using the packet content of the first fragmented packet. And accumulating the fragment offset of the first fragment message (the fragment offset of the first fragment message is 0) and the payload length of the first fragment message to serve as the fragment offset of the second fragment message, then updating the fragment offset in the current header of the second fragment message by using the fragment offset of the second fragment message, and simultaneously recording the fragment offset of the second fragment message and the payload length of the second fragment message by the network equipment. And then the second fragment message is sent to the next level of network equipment.
Then, the network device may read the third fragmented packet in the logical linked list as the current packet to be sent.
The network device may modify the header content of the third fragmented packet using the packet content of the first fragmented packet, and may accumulate the recorded fragmentation offset of the second fragmented packet and the payload length of the second fragmented packet as the fragmentation offset of the third fragmented packet.
The network device may update the fragment offset in the current header of the third fragment packet using the fragment offset of the third fragment packet, and at the same time, the network device records the fragment offset of the third fragment packet and the payload length of the third fragment packet. And then the third fragment message is sent to the next level network equipment.
The network device may sequentially send all remaining fragment messages in the logical linked list to the next level network device based on the above method for sending the second fragment message and the third fragment message.
In this embodiment, the above logical linked list may be sorted by using an insertion method.
When the network device reassembles the received fragment packet through the logical linked list, the network device may search, based on the fragment offset of the received fragment packet, an insertion position of the fragment packet in the logical linked list, and may insert the fragment packet to the searched position in the logical linked list.
It should be noted that, the above-mentioned logical linked list is sorted by using the insertion method, and the fragmented messages can be received and reassembled at the same time, so that the occurrence of sorting the fragmented messages after receiving all the fragmented messages is effectively avoided, and the reassembly delay of the fragmented messages can be effectively reduced.
The application provides a method for processing fragmented messages, wherein network equipment can respectively store received fragmented messages to corresponding cache regions; the buffer area comprises a header area and a data area. And the addresses of the data areas of the fragment messages can be orderly linked into corresponding logical linked lists based on the fragment offset recorded in the header area of each fragment message. The network device may perform corresponding service processing on each fragmented packet based on the logical linked list, and sequentially forward each fragmented packet to the next-stage network device based on the logical linked list after the processing is completed.
When the fragment messages are recombined, because the network device does not copy the fragment messages stored in the cache region to the continuous physical memory in order any more, the addresses of the data regions of the fragment messages can be linked to the corresponding logical linked lists in order based on the fragment offset recorded by the header region of each fragment message, and the fragment messages in the cache region are recombined to the logical original messages, thereby effectively reducing the copying times. Therefore, the performance of the equipment can be effectively improved, and the time delay of message forwarding is reduced.
Corresponding to the embodiment of the method for processing the fragment message, the application also provides an embodiment of a device for processing the fragment message.
The embodiment of the device for processing the fragmented messages can be applied to network equipment. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for operation through the processor of the network device where the software implementation is located as a logical means. In terms of hardware, as shown in fig. 5, the present application is a hardware structure diagram of a network device where a fragmentation message processing apparatus is located, and except for the processor, the memory, the network output interface, and the nonvolatile memory shown in fig. 5, the network device where the apparatus is located in the embodiment may also include other hardware according to the actual function of the network device, which is not described again.
Referring to fig. 6, fig. 6 is a block diagram of a device for processing a fragmentation message according to an exemplary embodiment of the present application. The device is applied to network equipment, and comprises:
a storage unit 610, configured to store the received fragment messages to corresponding cache regions respectively; the cache region comprises a header region and a data region;
a reassembling unit 620, configured to sequentially link addresses of the data areas of the respective fragment messages into corresponding logical linked lists based on fragment offsets recorded in header areas of the respective fragment messages;
the sending unit 630 is configured to perform corresponding service processing on each fragmented packet based on the logical linked list, and after the processing is completed, sequentially forward each fragmented packet to the next-stage network device based on the logical linked list.
In an optional implementation manner, the reassembly unit 620 is specifically configured to add a logical linked list pointer pointing to a data area address of a next fragmented packet in a header area of each fragmented packet; and linking the addresses of the data areas of the fragment messages into corresponding logical linked lists based on the pointers added to the header areas of the fragment messages.
In another optional implementation manner, the sending unit 630 is specifically configured to determine a first fragment packet based on the logical linked list, record a header and a payload length of the first fragment packet, and send the first fragment packet to a next-stage network device; sequentially selecting the unsent fragmented messages as the current messages to be sent based on the logic linked list; for the current message to be sent, updating the header of the current message to be sent based on the header of the first fragmented message, the effective load length of the last fragmented message and the fragmentation offset, and recording the fragmentation offset and the effective load length of the current message to be sent; and sending the current fragment message to be sent to the next-level network equipment.
In another optional implementation manner, the sending unit 630 is further configured to modify the header content of the current to-be-sent fragment message into the header content of the first fragment message, and add the fragment offset of the previous fragment message and the payload length of the previous fragment message to serve as the fragment offset of the current to-be-sent fragment message; and updating the value of the fragment offset in the header of the current message to be sent by using the fragment offset of the current message to be sent, which is obtained by accumulation.
In another optional implementation manner, the apparatus further includes:
the inserting unit 640 is configured to search, based on a fragment offset of the received fragment packet, an insertion position of the fragment packet in the logical linked list, and insert the fragment packet to the found insertion position in the logical linked list.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A method for processing a fragmented packet is applied to a network device, and the method comprises:
respectively storing the received fragment messages to corresponding cache regions; the cache region comprises a header region and a data region;
based on the fragment offset recorded in the header area of each fragment message, orderly linking the address of the data area of each fragment message into a corresponding logical linked list, and organizing each fragment message in the cache area into a logical original message;
and performing corresponding service processing on each fragment message based on the logic linked list, and after the processing is completed, sequentially forwarding each fragment message to the next-stage network equipment based on the logic linked list.
2. The method according to claim 1, wherein the linking the addresses of the data areas of the respective fragmented packets into corresponding logical linked lists comprises:
adding a logical linked list pointer pointing to the data area address of the next fragment message in the header area of each fragment message;
and linking the addresses of the data areas of the fragment messages into corresponding logical linked lists based on the pointers added to the header areas of the fragment messages.
3. The method according to claim 1, wherein the sequentially forwarding each fragmented packet to the next level of network device based on the logical linked list comprises:
determining a first fragment message based on the logic linked list, recording the header and the effective load length of the first fragment message, and sending the first fragment message to the next-level network equipment;
sequentially selecting the unsent fragmented messages as the current messages to be sent based on the logic linked list;
for the current message to be sent, updating the header of the current message to be sent based on the header of the first fragmented message, the effective load length of the last fragmented message and the fragmentation offset, and recording the fragmentation offset and the effective load length of the current message to be sent;
and sending the current fragment message to be sent to the next-level network equipment.
4. The method according to claim 3, wherein updating the header of the currently to-be-sent fragmented packet based on the header of the first fragmented packet, the payload length of the last fragmented packet, and the fragmentation offset comprises:
modifying the header content of the current fragmented message to be sent into the header content of the first fragmented message, and accumulating the fragment offset of the previous fragmented message and the effective load length of the previous fragmented message to be used as the fragment offset of the current fragmented message to be sent;
and updating the value of the fragment offset in the header of the current message to be sent by using the fragment offset of the current message to be sent, which is obtained by accumulation.
5. The method of claim 1, further comprising:
and based on the fragment offset of the received fragment message, searching the insertion position of the fragment message in the logic linked list, and inserting the fragment message to the searched insertion position in the logic linked list.
6. An apparatus for processing fragmented packets, the apparatus being applied to a network device, the apparatus comprising:
the storage unit is used for respectively storing the received fragment messages to corresponding cache regions; the cache region comprises a header region and a data region;
the reassembly unit is used for orderly linking the addresses of the data areas of the fragment messages into corresponding logical linked lists based on the fragment offset recorded in the header area of each fragment message, and organizing each fragment message in the cache area into a logical original message;
and the sending unit is used for carrying out corresponding service processing on each fragment message based on the logic linked list, and sequentially forwarding each fragment message to the next-stage network equipment based on the logic linked list after the processing is finished.
7. The apparatus according to claim 6, wherein the reassembly unit is specifically configured to add, in a header area of each fragmented packet, a logical linked list pointer pointing to a data area address of a next fragmented packet; and linking the addresses of the data areas of the fragment messages into corresponding logical linked lists based on the pointers added to the header areas of the fragment messages.
8. The apparatus according to claim 6, wherein the sending unit is specifically configured to determine a first segment packet based on the logical linked list, record a header and a payload length of the first segment packet, and send the first segment packet to a next-level network device; sequentially selecting the unsent fragmented messages as the current messages to be sent based on the logic linked list; for the current message to be sent, updating the header of the current message to be sent based on the header of the first fragmented message, the effective load length of the last fragmented message and the fragmentation offset, and recording the fragmentation offset and the effective load length of the current message to be sent; and sending the current fragment message to be sent to the next-level network equipment.
9. The apparatus according to claim 8, wherein the sending unit is further configured to modify the header content of the current segment packet to be sent to the first segment packet, and add a segment offset of the previous segment packet and a payload length of the previous segment packet to serve as the segment offset of the current segment packet to be sent; and updating the value of the fragment offset in the header of the current message to be sent by using the fragment offset of the current message to be sent, which is obtained by accumulation.
10. The apparatus of claim 6, further comprising:
and the inserting unit is used for searching the inserting position of the fragment message in the logic linked list based on the fragment offset of the received fragment message and inserting the fragment message to the searched inserting position in the logic linked list.
CN201611250019.7A 2016-12-29 2016-12-29 Method and device for processing fragment message Active CN106789730B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611250019.7A CN106789730B (en) 2016-12-29 2016-12-29 Method and device for processing fragment message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611250019.7A CN106789730B (en) 2016-12-29 2016-12-29 Method and device for processing fragment message

Publications (2)

Publication Number Publication Date
CN106789730A CN106789730A (en) 2017-05-31
CN106789730B true CN106789730B (en) 2020-02-11

Family

ID=58927948

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611250019.7A Active CN106789730B (en) 2016-12-29 2016-12-29 Method and device for processing fragment message

Country Status (1)

Country Link
CN (1) CN106789730B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109547389B (en) * 2017-08-08 2021-12-07 中国移动通信集团宁夏有限公司 Code stream file recombination method and device
CN108183893B (en) * 2017-12-25 2021-03-30 东软集团股份有限公司 Fragment packet detection method, detection device, storage medium and electronic equipment
CN110321374B (en) * 2018-10-23 2022-03-25 开采夫(杭州)科技有限公司 Standard file IO operating system and method based on distributed network
CN109672629B (en) * 2018-12-04 2023-04-07 迈普通信技术股份有限公司 Message sending method and communication equipment
CN109726144B (en) * 2018-12-27 2021-11-02 新华三技术有限公司 Data message processing method and device
CN113812119B (en) * 2019-09-21 2023-04-18 华为技术有限公司 Network node for performance measurement
CN113595940B (en) * 2021-09-28 2021-12-14 恒生电子股份有限公司 Fragment sending method, receiving method and corresponding devices

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013189364A1 (en) * 2012-10-12 2013-12-27 中兴通讯股份有限公司 Message processing method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100502297C (en) * 2003-08-05 2009-06-17 华为技术有限公司 Device and method for recombining Internet protocol (IP) packet
US7936757B2 (en) * 2009-02-27 2011-05-03 O2Micro International Limited Packet fragment reassembly
CN101789908B (en) * 2010-03-04 2012-08-15 成都市华为赛门铁克科技有限公司 Fragmental message receiving and processing method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013189364A1 (en) * 2012-10-12 2013-12-27 中兴通讯股份有限公司 Message processing method and device

Also Published As

Publication number Publication date
CN106789730A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN106789730B (en) Method and device for processing fragment message
CN101411136B (en) Method of performing table lookup operation with table index that exceeds CAM key size
CN110301120B (en) Stream classification device, method and system
EP2643762B1 (en) Method and apparatus for high performance, updatable, and deterministic hash table for network equipment
CN104901997B (en) System and method for the direct storage access in content center network
US7827182B1 (en) Searching for a path to identify where to move entries among hash tables with storage for multiple entries per bucket during insert operations
US9055011B2 (en) Methods and apparatus for linked-list circular buffer management
US7212529B2 (en) System for retrieving destination of a packet with plural headers
US20040146044A1 (en) Cache entry selection method and apparatus
US9049157B1 (en) Method and device for improving scalability of longest prefix match
CN105100045A (en) Method and apparatus for preventing insertion of malicious content at a named data network router
CN104915148A (en) System and method for efficient content caching in a streaming storage
CN104917681A (en) System and method for packet forwarding using a conjunctive normal from strategy in a content-centric network
CN110096458B (en) Named data network content storage pool data retrieval method based on neural network
CN1953418A (en) Method of processing information packets and telecommunication apparatus using the same
CN109726144B (en) Data message processing method and device
TWI397285B (en) Packet forwarding method
US9043408B2 (en) Apparatuses and methods for identifying email and email servers
CN110704419A (en) Data structure, data indexing method, device and equipment, and storage medium
CN111431806B (en) Flow table processing method and device
CN107204926B (en) Rapid route searching method for preprocessing cache
US11405323B2 (en) Method and network device for forwarding data packets
CN114697408B (en) Tunnel message processing method and device
US9444731B2 (en) Methods and systems for data packet routing
CN115695565B (en) Data message processing method and device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant