WO2017198108A1 - 一种处理分片报文的方法及装置 - Google Patents

一种处理分片报文的方法及装置 Download PDF

Info

Publication number
WO2017198108A1
WO2017198108A1 PCT/CN2017/084011 CN2017084011W WO2017198108A1 WO 2017198108 A1 WO2017198108 A1 WO 2017198108A1 CN 2017084011 W CN2017084011 W CN 2017084011W WO 2017198108 A1 WO2017198108 A1 WO 2017198108A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
message
received
fragmentation
sent
Prior art date
Application number
PCT/CN2017/084011
Other languages
English (en)
French (fr)
Inventor
陈敏
刘友志
王�锋
汤俊
赵佳博
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017198108A1 publication Critical patent/WO2017198108A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9057Arrangements for supporting packet reassembly or resequencing

Definitions

  • the present application relates to, but is not limited to, the field of communications, for example, to a method and apparatus for processing fragmented messages.
  • the entire network may include many devices. Each device can only know the MTU (Maximum Transmission Unit) value of the device and cannot obtain the MTU value of other devices on the path.
  • the size IPV6 (Internet Protocol Version 6, the sixth version of the Internet Protocol) has PMTU (Path MTU), but must also support fragmentation by minimum MTU), then the router needs to have fragmentation function; in the multi-core service board ( GSU)
  • GSU multi-core service board
  • the multi-core service board is generally a multi-core processor, although the packets arrive at each CPU (central processing unit) in sequence, the processing speed of each CPU cannot be guaranteed to be the same, so the first-come message cannot be guaranteed. It is processed first, so that the fragmented message will be out of order. In this way, when the message arrives at the reorganization device, it will also be out of order.
  • the embodiments of the present disclosure provide a method and an apparatus for processing a fragmented message to overcome the problem that the multi-core service board fragmentation causes the packet to be out of order.
  • the embodiment of the present disclosure provides a method for processing a fragmented packet, which is applicable to a multi-core service processing system, and includes:
  • the fragmenting the received packet includes: when the received packet is greater than a value of a pre-configured maximum transmission unit, fragmenting the received packet;
  • Determining whether the packet before the received packet has been sent before the sending of the received packet includes: sending the last packet after the fragmentation, determining the row Whether the message before the received message has been sent.
  • the received packet when the received packet is equal to the value of the pre-configured maximum transmission unit, the received packet may also be fragmented;
  • the method before the fragmentation of the received packet, the method further includes: receiving a packet, and when determining that the received packet is greater than a value of a pre-configured maximum transmission unit, giving the received packet The message is tagged with a serial number;
  • the method further includes: copying the serial number to the last packet;
  • the method further includes: stripping the serial number.
  • the method before the fragmentation of the received packet, the method further includes:
  • the received message is marked with a slice indicating that the multi-core processor performs fragmentation.
  • the fragmenting the received packet includes:
  • Each CPU is polled, and the received message is sent to the idle CPU for fragmentation processing in the order of the serial number.
  • An embodiment of the present disclosure provides an apparatus for processing a fragmented message, including:
  • a fragmentation module configured to slice the received message
  • the sending module is configured to determine whether the packet before the received packet has been sent before the received packet is sent, and if the packet is not sent, the last packet is buffered. If the message is sent, the last piece of the message is sent.
  • the fragmentation module is configured to slice the received packet when the received packet is greater than a value of the pre-configured maximum transmission unit;
  • the sending module is configured to: when sending the last packet after the fragmentation, determine whether the packet before the received packet has been sent.
  • the fragmentation module may also slice the received packet when the received packet is equal to the value of the pre-configured maximum transmission unit.
  • the sending module may also determine whether the message before the received message has been sent when the last two pieces or the last three pieces of the message are sent.
  • the device further includes:
  • the receiving module is configured to receive the message, and when it is determined that the received message is greater than the value of the pre-configured maximum transmission unit, the received message is serialized and output to the fragmentation module. ;
  • the fragmentation module after the fragmentation of the received packet, is further configured to: copy the serial number to the last piece of the message;
  • the sending module is further configured to: strip the serial number before sending the last piece of the message.
  • the receiving module before outputting the received message to the fragmentation module, is further configured to: mark the received message with a slice indicating that the multi-core processor performs fragmentation. mark.
  • the fragmentation module is configured to: when the fragmented packet is fragmented, be configured to: poll the CPUs, and send the received packet to the idle CPU in the sequence of the serial number. Perform fragmentation processing.
  • Embodiments of the present disclosure also provide a non-transitory computer readable storage medium storing computer executable instructions arranged to perform the above method.
  • An embodiment of the present disclosure further provides an electronic device, including:
  • At least one processor At least one processor
  • the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the method described above.
  • the embodiments of the present disclosure provide a method and an apparatus for processing a fragmented message, which can overcome the problem that the multi-core service board fragmentation in the related art may cause out-of-order.
  • the line card is used to serialize the message before the packet is sent to the multi-core service board, and the order of the last piece of the packet is controlled by the sequence number to ensure the timing of the entire message.
  • FIG. 1 is a flowchart of a method for processing a fragmented message according to an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of an apparatus for processing a fragmented message according to an embodiment of the present disclosure
  • FIG. 3 is a basic architectural diagram of an operation principle of an embodiment of the present disclosure.
  • FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
  • a method for processing a fragmented packet includes the following steps:
  • Step 11 When the received packet is greater than the value of the pre-configured maximum transmission unit, the packet is fragmented
  • Step 12 When sending the last packet after the fragmentation, it is determined whether the packet before the packet has been sent. If not, the last packet is buffered. If the packet is sent, the packet is sent. The last piece of the message.
  • FIG. 2 is a schematic diagram of an apparatus for processing a fragmented packet according to an embodiment of the present disclosure. As shown in FIG. 2, the apparatus of this embodiment includes:
  • the fragmentation module when the received packet is larger than the value of the pre-configured maximum transmission unit, the fragment is fragmented;
  • the sending module is configured to: when the last packet after the fragment is sent, determine whether the packet before the packet has been sent, and if not, cache the last packet, if sent, send The last piece of the message.
  • the apparatus of this embodiment may further include:
  • a receiving module configured to receive the packet, when determining that the packet is greater than a pre-configured maximum transmission When the value of the unit is input, the message is marked with a serial number and output to the fragmentation module;
  • the fragmentation module after the fragmentation is performed, is further configured to: copy the serial number to the last piece of the message;
  • the sending module is further configured to: strip the serial number before sending the last piece of the message.
  • the receiving module before outputting the packet to the fragmentation module, is further configured to: mark the packet with a fragmentation flag indicating that the multi-core processor performs fragmentation.
  • the fragmentation module, the fragmenting the packet includes: polling each central processing unit CPU, and sending the packet to an idle CPU for fragmentation processing in the order of the serial number.
  • FIG. 3 is a basic structural diagram of packet fragmentation of a multi-core service board according to an embodiment of the present disclosure.
  • the hardware module part of this embodiment includes: a main control board of the device, a multi-core processing board, and a line card.
  • the R-CPU is the CPU on the main control board MPU
  • the L-CPU is the CPU on the line card.
  • the main control board needs OAM to perform command configuration for sending packets that need to be fragmented to the multi-core processing board.
  • FIG. 4 is a flowchart of processing a fragmented packet according to an embodiment of the present disclosure. The embodiment includes the following steps:
  • Step 100 telnet (remote login) to the device OAM (Operation Administration Management) (command configuration) interface to configure the MTU (Maximum Transmission Unit) value of the interface;
  • the MPU sends the value of the MTU of the interface to the FTM (Forwarding Table Manage) of the line card.
  • the FTM obtains the interface MTU, Np (Network Processor, Network Processor).
  • the network processor on the PFU reads the configuration value A from the FTM, which acquires the interface MTU.
  • the FTM obtains the fragmentation label to be sent to the multi-core service board.
  • the Np obtains the fragmentation label to be sent to the multi-core service board.
  • Step 101 Np determines whether the size B of the received message is greater than the interface MTU value A, if not greater, then directly sent, if greater, then proceeds to step 102;
  • the Np judges that when the size B of the received message is greater than the interface MTU value A, the packet is marked with a fragmentation flag indicating that the multi-core processor performs fragmentation, and then proceeds to step 102.
  • Step 102 The Np sends the packet to the multi-core service board for processing by using the serial number.
  • the PFU Packet Forwarding Unit
  • the PFU is the card that comes in the packet, and the interface card is used to send the serial number to the packet.
  • the packet is sent to the multi-core service board. It is not the board that the message comes in. After the message comes in, it is sent to the multi-core service board for processing).
  • Step 103 The multi-core service processing board polls the CPU, and sends the first-mentioned packet to the idle CPU for processing;
  • the multi-core service version polls each CPU to determine whether there is an idle CPU. If there is an idle CPU, the packet with the serial number will be sent to the idle CPU for processing. If all CPUs are busy, then Wait for a waiting period to continue polling;
  • Step 105 The multi-core service board sends the fragmented packet to the Np.
  • Step 106 The packet received by the Np determines the mf value, for example, if the mf value is equal to 1, the process proceeds to step 107;
  • Embodiments of the present disclosure also provide a non-transitory computer readable storage medium storing computer executable instructions arranged to perform the method of any of the above embodiments.
  • the embodiment of the present disclosure further provides a schematic structural diagram of an electronic device.
  • the electronic device includes:
  • At least one processor 50 which is exemplified by a processor 50 in FIG. 5; and a memory 51, may further include a communication interface 52 and a bus 53.
  • the processor 50, the communication interface 52, and the memory 51 can complete communication with each other through the bus 53.
  • Communication interface 52 can be used for information transmission.
  • Processor 50 can invoke logic instructions in memory 51 to perform the methods of the above-described embodiments.
  • logic instructions in the memory 51 described above can be implemented in the form of software functional units and When sold or used as a stand-alone product, it can be stored on a computer readable storage medium.
  • the memory 51 is used as a computer readable storage medium for storing software programs, computer executable programs, and program instructions/modules corresponding to the methods in the embodiments of the present disclosure.
  • the processor 50 executes the function application and the data processing by executing the software program, the instruction and the module stored in the memory 51, that is, the method for processing the fragmented message in the above method embodiment.
  • the memory 51 may include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to use of the terminal device, and the like. Further, the memory 51 may include a high speed random access memory, and may also include a nonvolatile memory.
  • the technical solution of the embodiments of the present disclosure may be embodied in the form of a software product stored in a storage medium, including one or more instructions for causing a computer device (which may be a personal computer, a server, or a network) The device or the like) performs all or part of the steps of the method described in the embodiments of the present disclosure.
  • the foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like.
  • the method described in the embodiment of the present disclosure has made great progress.
  • the method and device for processing fragmented packets provided by the embodiments of the present disclosure can overcome the problem that the multi-core service board fragmentation in the related art may cause out-of-order.

Landscapes

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

Abstract

一种处理分片报文的方法,适用于多核业务处理***,包括:对接收到的报文进行分片;在分片后的所述接收到的报文发送完之前,判断排在所述接收到的报文前的报文是否已发送,如未发送,则缓存所述最后一片报文,如已发送,则发送所述最后一片报文。该方案可以克服相关技术中存在的多核业务板分片会产生乱序的问题。

Description

一种处理分片报文的方法及装置 技术领域
本申请涉及但不限于通信领域,例如涉及一种处理分片报文的方法及装置。
背景技术
对复杂的网络环境,整个环境的组网可能包括了很多台设备,由于每台设备只能知道本设备的MTU(Maximum Transmission Unit,最大传输单元)值,而无法获取路径上其他设备的MTU值的大小(IPV6(Internet Protocol Version 6,互联网协议的第六版)有PMTU(路径MTU),但也必须支持按最小MTU进行分片),这时需要路由器具备分片功能;在多核业务板(GSU)上面做分片重组功能,有可以方便布署、功能可裁减、性能可裁减等方面优点。但是由于多核业务板(GSU)一般为多核处理器,报文虽然是按照先后顺序到达各个CPU(中央处理器)的,但是不能保证每个CPU的处理速度一样,因此不能保证先到的报文先被处理完,从而分片后的报文会产生乱序的情况。这样,报文到达重组设备的时候也会产生乱序。
发明内容
本公开实施例提供一种处理分片报文的方法及装置,以克服多核业务板分片使报文产生乱序的问题。
本公开实施例提供了一种处理分片报文的方法,适用于多核业务处理***,包括:
对接收到的报文进行分片;
在分片后的所述接收到的报文发送完之前,判断排在所述接收到的报文前的报文是否已发送,如未发送,则缓存所述最后一片报文,如已发送,则发送所述最后一片报文。
可选地,所述对接收到的报文进行分片包括:当接收到的报文大于预配置的最大传输单元的值时,对所述接收到的报文进行分片;
所述在分片后的所述接收到的报文发送完之前,判断排在所述接收到的报文前的报文是否已发送包括:发送分片后的最后一片报文时,判断排在所述接收到的报文前的报文是否已发送。
当然,当接收到的报文等于预配置的最大传输单元的值时,也可以对所述接收到的报文进行分片;
另外,也可以在发送分片后的最后两片或最后三片等报文时,判断排在所述接收到的报文前的报文是否已发送。
可选地,对所述接收到的报文进行分片前,还包括:接收报文,当确定所述接收到的报文大于预配置的最大传输单元的值时,给所述接收到的报文打上序列号;
对所述接收到的报文进行分片后,还包括:将所述序列号复制给所述最后一片报文;
发送所述最后一片报文之前,还包括:剥掉所述序列号。
可选地,对所述接收到的报文进行分片前,还包括:
给所述接收到的报文打上指示由多核处理器进行分片的分片标记。
可选地,对所述接收到的报文进行分片包括:
轮询各个中央处理器CPU,按所述序列号的顺序将所述接收到的报文发送给空闲CPU进行分片处理。
本公开实施例提供一种处理分片报文的装置,包括:
分片模块,被配置为对接收到的报文进行分片;
发送模块,被配置为在分片后的所述接收到的报文发送完之前,判断排在所述接收到的报文前的报文是否已发送,如未发送则缓存所述最后一片报文,如已发送,则发送所述最后一片报文。
可选地,所述分片模块,被配置为当接收到的报文大于预配置的最大传输单元的值时,对所述接收到的报文进行分片;
所述发送模块,被配置为发送分片后的最后一片报文时,判断排在所述接收到的报文前的报文是否已发送。
当然,所述分片模块也可以在接收到的报文等于预配置的最大传输单元的值时,对所述接收到的报文进行分片;
另外,所述发送模块也可以在发送分片后的最后两片或最后三片等报文时,判断排在所述接收到的报文前的报文是否已发送。
可选地,所述装置还包括:
接收模块,被配置为接收报文,当确定所述接收到的报文大于预配置的最大传输单元的值时,给所述接收到的报文打上序列号后,输出给所述分片模块;
所述分片模块,对所述接收到的报文进行分片后还被配置为:将所述序列号复制给所述最后一片报文;
所述发送模块,发送所述最后一片报文之前还被配置为:剥掉所述序列号。
可选地,所述接收模块,将所述接收到的报文输出给所述分片模块之前还被配置为,给所述接收到的报文打上指示由多核处理器进行分片的分片标记。
可选地,所述分片模块,对所述接收到的报文进行分片时被配置为:轮询各个CPU,按所述序列号的顺序将所述接收到的报文发送给空闲CPU进行分片处理。
本公开实施例还提供了一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述方法。
本公开实施例还提供了一种电子设备,包括:
至少一个处理器;以及
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器执行上述的方法。
综上,本公开实施例提供一种处理分片报文的方法及装置,可以克服相关技术中存在的多核业务板分片会产生乱序的问题。该方法通过线卡在报文上送多核业务板分片之前为报文打上序列号,并通过序列号控制最后一片分片报文的顺序来保证整个报文的时序。
附图概述
图1为本公开实施例的一种处理分片报文的方法的流程图;
图2为本公开实施例的一种处理分片报文的装置的示意图;
图3为本公开实施例的工作原理的基本架构图;
图4为本公开实施例的基本工作流程图;以及
图5为本公开实施例的电子设备的结构示意图。
具体实施方式
为使本公开的技术方案和优点更加清楚明白,下文中将结合附图对本公开的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
本公开实施例提供的一种处理分片报文的方法,如图1所示,包括以下步骤:
步骤11、当接收到的报文大于预配置的最大传输单元的值时,对所述报文进行分片;
步骤12、发送分片后的最后一片报文时,判断排在所述报文前的报文是否已发送,如未发送,则缓存所述最后一片报文,如已发送,则发送所述最后一片报文。
图2为本公开实施例的一种处理分片报文的装置的示意图,如图2所示,本实施例的装置包括:
分片模块,当接收到的报文大于预配置的最大传输单元的值时,对所述报文进行分片;
发送模块,被配置为发送分片后的最后一片报文时,判断排在所述报文前的报文是否已发送,如未发送则缓存所述最后一片报文,如已发送,则发送所述最后一片报文。
可选地,本实施例的装置还可以包括:
接收模块,被配置为接收所述报文,当确定所述报文大于预配置的最大传 输单元的值时,给所述报文打上序列号后,输出给所述分片模块;
所述分片模块,对所述报文进行分片后还被配置为:将所述序列号复制给所述最后一片报文;
所述发送模块,发送所述最后一片报文之前还被配置为:剥掉所述序列号。
可选地,所述接收模块,将所述报文输出给所述分片模块之前还被配置为,给所述报文打上指示由多核处理器进行分片的分片标记。
可选地,所述分片模块,对所述报文进行分片包括:轮询各个中央处理器CPU,按所述序列号的顺序将所述报文发送给空闲CPU进行分片处理。
以下以实施例对本申请的方法进行详细的说明。
图3为本公开实施例的多核业务板报文分片的基本架构图。本实施例的硬件模块部分包括:设备的主控板、多核处理板和线卡。图3中,R-CPU是主控板MPU上面的CPU,L-CPU就是线卡上的CPU。其中,主控板需要OAM进行将需要分片的报文上送多核处理板的命令配置。
图4为本公开实施例的处理分片报文的流程图,本实施例包括以下步骤:
步骤100、telnet(远程登陆)到设备OAM(Operation Administration Management,运行管理维护)(命令配置)界面配置接口的MTU(最大传输单元)值;
需要在OAM界面上配置接口MTU,主控板将配置的接口MTU的值A下发到线卡的FTM(Forwarding Table Manage,转发表管理),FTM获取接口MTU,Np(Network Processor,网络处理器)(PFU上的网络处理器)从FTM读取配置值A,Np获取接口MTU。
需要在OAM界面上配置需上送多核业务板的分片标记,FTM获取需上送多核业务板的分片标记,Np获取需上送多核业务板的分片标记;
步骤101、Np判断当接收到报文的大小B是否大于接口MTU值A,若不大于,则直接发送,若大于,则转步骤102;
Np判断当接收到报文的大小B大于接口MTU值A时,给所述报文打上指示由多核处理器进行分片的分片标记,然后转步骤102。
步骤102、Np将报文打上序列号上送多核业务板进行处理;
在PFU(Packet Forwarding Unit,线卡功能子单元)(PFU为报文进来的板卡,上面有接口卡)上面给报文打序列号,并将报文上送给多核业务板(多核业务板不是报文进来的板卡,报文进来后再送给多核业务板进行处理)。
步骤103、多核业务处理板轮询CPU,将先到的报文发送给空闲CPU进行处理;
多核业务版收到报文后,轮询各CPU,判断是否有空闲CPU,若有空闲CPU,则将先到达并打上序列号的报文给空闲的CPU进行处理,如果所有CPU都忙,则等待一个等待周期后继续轮询;
步骤104、CPU收到报文后,根据接口配置MTU对报文进行分片,并将序列号复制给mf=0的最后一片报文,将分片后的报文发给多核业务板;
步骤105、多核业务板将分片后的报文发给Np;
步骤106、Np收到的报文判断mf值,如mf值等于1的直接转发,如mf等于0,则转步骤107;
步骤107、判断前一个序列号的mf=0的报文是否发送;若未发送,则放在缓存区等待,等一个时间周期,再进行判断,待前一个序列号的mf=0的报文发送之后,才从缓存队列中取出发送;如已经发送,则剥掉序列号发送。
本公开实施例还提供了一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述任一实施例中的方法。
本公开实施例还提供了一种电子设备的结构示意图。参见图5,该电子设备包括:
至少一个处理器(processor)50,图5中以一个处理器50为例;和存储器(memory)51,还可以包括通信接口(Communications Interface)52和总线53。其中,处理器50、通信接口52、存储器51可以通过总线53完成相互间的通信。通信接口52可以用于信息传输。处理器50可以调用存储器51中的逻辑指令,以执行上述实施例的方法。
此外,上述的存储器51中的逻辑指令可以通过软件功能单元的形式实现并 作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。
存储器51作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序,如本公开实施例中的方法对应的程序指令/模块。处理器50通过运行存储在存储器51中的软件程序、指令以及模块,从而执行功能应用以及数据处理,即实现上述方法实施例中的处理分片报文的方法。
存储器51可包括存储程序区和存储数据区,其中,存储程序区可存储操作***、至少一个功能所需的应用程序;存储数据区可存储根据终端设备的使用所创建的数据等。此外,存储器51可以包括高速随机存取存储器,还可以包括非易失性存储器。
本公开实施例的技术方案可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括一个或多个指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开实施例所述方法的全部或部分步骤。而前述的存储介质可以是非暂态存储介质,包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等多种可以存储程序代码的介质,也可以是暂态存储介质。
采用本公开实施例所述方法,与相关技术相比,取得了很大的进步,多核业务板处理分片报文的优势可以多个cpu并行处理业务,增加整机的处理效率和性能,但是多cpu处理分片业务必然会出现乱序的情况,由于重组报文时,只有最后一片报文到达目的地才会进行重组,因此只需要控制最后一片mf=0的报文就可以保序,而mf=0的报文往往是所有分片报文里面最小的,只处理最后一片报文,不会过多增加设备的负担。
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的各模块/单元可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本公开不限制于任何特定形式 的硬件和软件的结合。
以上仅为本公开的实施例,当然,本公开还可有其他多种实施例,在不背离本公开实施例的情况下,熟悉本领域的技术人员当可根据本公开作出各种相应的改变和变形,但这些相应的改变和变形都应属于本公开所附的权利要求的保护范围。
工业实用性
本公开实施例提供的处理分片报文的方法及装置,可以克服相关技术中存在的多核业务板分片会产生乱序的问题。

Claims (11)

  1. 一种处理分片报文的方法,适用于多核业务处理***,包括:
    对接收到的报文进行分片;
    在分片后的所述接收到的报文发送完之前,判断排在所述接收到的报文前的报文是否已发送,如未发送,则缓存所述最后一片报文,如已发送,则发送所述最后一片报文。
  2. 如权利要求1所述的方法,其中,
    所述对接收到的报文进行分片包括:当接收到的报文大于预配置的最大传输单元的值时,对所述接收到的报文进行分片;
    所述在分片后的所述接收到的报文发送完之前,判断排在所述接收到的报文前的报文是否已发送包括:发送分片后的最后一片报文时,判断排在所述接收到的报文前的报文是否已发送。
  3. 如权利要求2所述的方法,其中,
    对所述接收到的报文进行分片前,还包括:接收报文,当确定所述接收到的报文大于预配置的最大传输单元的值时,给所述接收到的报文打上序列号;
    对所述接收到的报文进行分片后,还包括:将所述序列号复制给所述最后一片报文;
    发送所述最后一片报文之前,还包括:剥掉所述序列号。
  4. 如权利要求3所述的方法,其中,对所述接收到的报文进行分片前,还包括:
    给所述接收到的报文打上指示由多核处理器进行分片的分片标记。
  5. 如权利要求2至4任一项所述的方法,其中,对所述接收到的报文进行分片包括:
    轮询各个中央处理器CPU,按所述序列号的顺序将所述接收到的报文发送给空闲CPU进行分片处理。
  6. 一种处理分片报文的装置,包括:
    分片模块,被配置为对接收到的报文进行分片;
    发送模块,被配置为在分片后的所述接收到的报文发送完之前,判断排在所述接收到的报文前的报文是否已发送,如未发送则缓存所述最后一片报文,如已发送,则发送所述最后一片报文。
  7. 如权利要求6所述的装置,其中,
    所述分片模块,被配置为当接收到的报文大于预配置的最大传输单元的值时,对所述接收到的报文进行分片;
    所述发送模块,被配置为发送分片后的最后一片报文时,判断排在所述接收到的报文前的报文是否已发送。
  8. 如权利要求7所述的装置,还包括:
    接收模块,被配置为接收报文,当确定所述接收到的报文大于预配置的最大传输单元的值时,给所述接收到的报文打上序列号后,输出给所述分片模块;
    所述分片模块,对所述接收到的报文进行分片后还被配置为:将所述序列号复制给所述最后一片报文;
    所述发送模块,发送所述最后一片报文之前还被配置为:剥掉所述序列号。
  9. 如权利要求8所述的装置,其中,
    所述接收模块,将所述接收到的报文输出给所述分片模块之前还被配置为,给所述接收到的报文打上指示由多核处理器进行分片的分片标记。
  10. 如权利要求7至9任一项所述的装置,其中,
    所述分片模块,对所述接收到的报文进行分片时被配置为:轮询各个CPU, 按所述序列号的顺序将所述接收到的报文发送给空闲CPU进行分片处理。
  11. 一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行权利要求1-5中任一项的方法。
PCT/CN2017/084011 2016-05-19 2017-05-11 一种处理分片报文的方法及装置 WO2017198108A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610338231.2A CN107404446A (zh) 2016-05-19 2016-05-19 一种处理分片报文的方法及装置
CN201610338231.2 2016-05-19

Publications (1)

Publication Number Publication Date
WO2017198108A1 true WO2017198108A1 (zh) 2017-11-23

Family

ID=60324838

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/084011 WO2017198108A1 (zh) 2016-05-19 2017-05-11 一种处理分片报文的方法及装置

Country Status (2)

Country Link
CN (1) CN107404446A (zh)
WO (1) WO2017198108A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109672629A (zh) * 2018-12-04 2019-04-23 迈普通信技术股份有限公司 一种报文发送方法及通信设备
CN113542131A (zh) * 2021-05-25 2021-10-22 新华三信息安全技术有限公司 一种报文转发方法及装置
CN113595932A (zh) * 2021-08-06 2021-11-02 上海金仕达软件科技有限公司 数据乱序报文的处理方法及专用集成电路
CN114731334A (zh) * 2020-02-14 2022-07-08 华为技术有限公司 报文保序方法和装置

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107888710A (zh) * 2017-12-26 2018-04-06 新华三信息安全技术有限公司 一种报文转发方法及装置
CN109783430B (zh) * 2018-12-03 2021-04-27 国家计算机网络与信息安全管理中心 表项快速同步的方法及***
CN113053380B (zh) * 2021-03-29 2023-12-01 海信电子科技(武汉)有限公司 服务器及语音识别方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101795236A (zh) * 2010-03-31 2010-08-04 成都市华为赛门铁克科技有限公司 报文保序方法及装置
CN102546424A (zh) * 2012-01-20 2012-07-04 华为技术有限公司 报文保序方法及装置
CN102868636A (zh) * 2012-09-11 2013-01-09 汉柏科技有限公司 多核网络设备报文按流保序方法及***
CN102868635A (zh) * 2012-08-24 2013-01-09 汉柏科技有限公司 多核多线程的报文保序方法及***
US20130259036A1 (en) * 2012-03-29 2013-10-03 Eliezer Tamir Techniques for forwarding or receiving data segments associated with a large data packet
WO2014015498A1 (zh) * 2012-07-26 2014-01-30 华为技术有限公司 报文发送方法、接收方法、装置及***

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7573896B2 (en) * 2004-10-15 2009-08-11 Integrated Device Technology, Inc. Method and apparatus for generic interface, packet cut-through, overbooking, queue concatenation, and logical identification priority for a system packet interface device
CN101656677B (zh) * 2009-09-18 2011-11-16 杭州迪普科技有限公司 一种报文分流处理方法及装置
CN101917472B (zh) * 2010-08-12 2013-05-29 北京星网锐捷网络技术有限公司 一种多链路报文的重组方法、装置及设备
CN102104544B (zh) * 2011-01-25 2012-06-20 无锡网芯科技有限公司 硬件加速的多核处理器ip隧道分片报文流保序方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101795236A (zh) * 2010-03-31 2010-08-04 成都市华为赛门铁克科技有限公司 报文保序方法及装置
CN102546424A (zh) * 2012-01-20 2012-07-04 华为技术有限公司 报文保序方法及装置
US20130259036A1 (en) * 2012-03-29 2013-10-03 Eliezer Tamir Techniques for forwarding or receiving data segments associated with a large data packet
WO2014015498A1 (zh) * 2012-07-26 2014-01-30 华为技术有限公司 报文发送方法、接收方法、装置及***
CN102868635A (zh) * 2012-08-24 2013-01-09 汉柏科技有限公司 多核多线程的报文保序方法及***
CN102868636A (zh) * 2012-09-11 2013-01-09 汉柏科技有限公司 多核网络设备报文按流保序方法及***

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109672629A (zh) * 2018-12-04 2019-04-23 迈普通信技术股份有限公司 一种报文发送方法及通信设备
CN109672629B (zh) * 2018-12-04 2023-04-07 迈普通信技术股份有限公司 一种报文发送方法及通信设备
CN114731334A (zh) * 2020-02-14 2022-07-08 华为技术有限公司 报文保序方法和装置
CN114731334B (zh) * 2020-02-14 2023-10-20 华为技术有限公司 报文保序方法和装置
CN113542131A (zh) * 2021-05-25 2021-10-22 新华三信息安全技术有限公司 一种报文转发方法及装置
CN113542131B (zh) * 2021-05-25 2023-08-22 新华三信息安全技术有限公司 一种报文转发方法及装置
CN113595932A (zh) * 2021-08-06 2021-11-02 上海金仕达软件科技有限公司 数据乱序报文的处理方法及专用集成电路
CN113595932B (zh) * 2021-08-06 2024-05-14 上海金仕达软件科技股份有限公司 数据乱序报文的处理方法及专用集成电路

Also Published As

Publication number Publication date
CN107404446A (zh) 2017-11-28

Similar Documents

Publication Publication Date Title
WO2017198108A1 (zh) 一种处理分片报文的方法及装置
US10826830B2 (en) Congestion processing method, host, and system
WO2017067391A1 (zh) 虚拟机的数据共享方法及装置
CN110022264B (zh) 控制网络拥塞的方法、接入设备和计算机可读存储介质
CN109690510B (zh) 用于将数据分发到高性能计算网络和基于云的网络中的多个接收器的多播装置和方法
US20130205037A1 (en) Tcp-aware receive side coalescing
US8953631B2 (en) Interruption, at least in part, of frame transmission
US9155046B2 (en) Optimizing semi-active workloads
US9762493B2 (en) Link aggregation (LAG) information exchange protocol
WO2017206763A1 (zh) 一种终端设备及数据处理方法、存储介质
WO2014194677A1 (zh) 一种业务流程的控制方法及网络设备
CN106330742B (zh) 一种流量控制的方法及网络控制器
CN112242956B (zh) 流速控制方法和装置
US20210359952A1 (en) Technologies for protocol-agnostic network packet segmentation
WO2020073907A1 (zh) 转发表项的更新方法及装置
KR20160027902A (ko) Am을 통한 rma api의 지원
US20160134522A1 (en) Data flow processing method, device, and system
CN113973091A (zh) 一种报文处理方法、网络设备以及相关设备
US9590925B2 (en) Packet processing apparatus, packet processing method, and non-transitory computer-readable storage medium
WO2010023951A1 (ja) セキュア通信装置、セキュア通信方法及びプログラム
JP4415391B2 (ja) データをネットワークに送信する方法及び装置並びにデータをネットワークから受信する方法及び装置
WO2016176942A1 (zh) 一种基于负载均衡器的链路复用方法及***
WO2021103822A1 (zh) 用于获取共用最大分段大小mss的方法及装置
WO2014205638A1 (zh) 一种数据包传输方法及设备
WO2018006663A1 (zh) 一种报文加速方法、装置及存储介质

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17798671

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17798671

Country of ref document: EP

Kind code of ref document: A1