[go: up one dir, main page]

CN116208574A - Message processing method, device, electronic equipment and computer readable storage medium - Google Patents

Message processing method, device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN116208574A
CN116208574A CN202310237832.4A CN202310237832A CN116208574A CN 116208574 A CN116208574 A CN 116208574A CN 202310237832 A CN202310237832 A CN 202310237832A CN 116208574 A CN116208574 A CN 116208574A
Authority
CN
China
Prior art keywords
data
message
packet
double
data packet
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.)
Granted
Application number
CN202310237832.4A
Other languages
Chinese (zh)
Other versions
CN116208574B (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.)
Suzhou Centec Communications Co Ltd
Original Assignee
Suzhou Centec Communications 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 Suzhou Centec Communications Co Ltd filed Critical Suzhou Centec Communications Co Ltd
Priority to CN202310237832.4A priority Critical patent/CN116208574B/en
Publication of CN116208574A publication Critical patent/CN116208574A/en
Application granted granted Critical
Publication of CN116208574B publication Critical patent/CN116208574B/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/9084Reactions to storage capacity overflow
    • H04L49/9089Reactions to storage capacity overflow replacing packets in a storage arrangement, e.g. pushout
    • H04L49/9094Arrangements for simultaneous transmit and receive, e.g. simultaneous reading/writing from/to the storage element
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • 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

Landscapes

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

Abstract

本发明实施例提出一种报文处理方法、装置、电子设备及计算机可读存储介质,属于通信技术领域,网络设备在监测到外部设备开始发送业务报文的数据包时,在当前收包处于拥塞状态的情况下,将接收的数据包写入双倍速率同步动态随机存储器,在当前收包未处于拥塞状态的情况下,将接收的数据包中的报文头数据直接写入中央处理器的高速缓存中,将报文头数据之外的其他数据写入双倍速率同步动态随机存储器,从而使得中央处理器处理该业务报文时,报文头数据已经在高速缓存中,无需再去访问双倍速率同步动态随机存储器来获取报文头数据,能够有效减轻中央处理器对双倍速率同步动态随机存储器的访存压力,进而能够提升软转发的整体性能。

Figure 202310237832

Embodiments of the present invention propose a message processing method, device, electronic equipment, and computer-readable storage medium, which belong to the field of communication technology. In the case of congestion, write the received data packet into the double-rate synchronous dynamic random access memory, and write the header data in the received data packet directly to the central processing unit when the current receiving packet is not in a congested state In the high-speed cache, other data other than the header data are written into the double-rate synchronous dynamic random access memory, so that when the central processing unit processes the service message, the header data is already in the cache, and there is no need to go to the Accessing the double-rate synchronous DRAM to obtain the packet header data can effectively reduce the memory access pressure of the central processing unit on the double-rate synchronous DRAM, thereby improving the overall performance of soft forwarding.

Figure 202310237832

Description

报文处理方法、装置、电子设备及计算机可读存储介质Message processing method, device, electronic device, and computer-readable storage medium

技术领域technical field

本发明涉及通信技术领域,具体而言,涉及一种报文处理方法、装置、电子设备及计算机可读存储介质。The present invention relates to the technical field of communications, and in particular, to a message processing method, device, electronic equipment, and computer-readable storage medium.

背景技术Background technique

网络设备接收到报文时,会将报文信息进行存储,再基于存储的报文信息进行识别,根据识别结果进行查表转发。When a network device receives a message, it will store the message information, then identify it based on the stored message information, and perform table lookup and forwarding based on the identification result.

传统的报文软转发的处理流程为:DMA(Direct Memory Access,直接存储器访问)控制器先写包到DDR SDRAM(Double Data Rate Synchronous Dynamic Random AccessMemory,双倍速率同步动态随机存储器),写完对应的报文后,更新DMA描述符或更新DMA描述符同时提供中断,CPU(central processing unit,中央处理器)通过轮询DMA描述符或DMA提供的中断感知报文接收,之后CPU按DMA描述符取得报文数据地址,从DDR读取报文数据,对报文数据进行解析和转发。但是,由于CPU读取DDR的时延较长,在取回数据前CPU无法继续处理接收到的报文,导致CPU资源空耗,整体性能大幅下降。The processing flow of the traditional message soft forwarding is: DMA (Direct Memory Access, direct memory access) controller first writes the packet to DDR SDRAM (Double Data Rate Synchronous Dynamic Random Access Memory, double data rate synchronous dynamic random access memory), and writes the corresponding After the message, update the DMA descriptor or update the DMA descriptor and provide an interrupt at the same time, the CPU (central processing unit, central processing unit) receives the message by polling the DMA descriptor or the interrupt awareness message provided by the DMA, and then the CPU presses the DMA descriptor Obtain the message data address, read the message data from the DDR, parse and forward the message data. However, due to the long delay for the CPU to read the DDR, the CPU cannot continue to process the received packets before retrieving the data, resulting in CPU resource consumption and a significant drop in overall performance.

发明内容Contents of the invention

有鉴于此,本发明的目的在于提供一种报文处理方法、装置、电子设备及计算机可读存储介质,其能够改善传统的报文软转发方法所导致的CPU资源空耗、整体性能大幅下降的问题。In view of this, the object of the present invention is to provide a message processing method, device, electronic equipment, and computer-readable storage medium, which can improve the CPU resource consumption caused by the traditional message soft forwarding method and the overall performance is greatly reduced. question.

为了实现上述目的,本发明实施例采用的技术方案如下:In order to achieve the above object, the technical solution adopted in the embodiment of the present invention is as follows:

第一方面,本发明实施例提供一种报文处理方法,应用于网络设备,所述网络设备包括中央处理器和双倍速率同步动态随机存储器,方法包括:In the first aspect, an embodiment of the present invention provides a message processing method, which is applied to a network device. The network device includes a central processing unit and a double-rate synchronous dynamic random access memory. The method includes:

监测到外部设备开始发送业务报文的数据包时,判断当前收包是否处于拥塞状态;When it is detected that the external device starts to send data packets of service messages, it is judged whether the current receiving packet is in a congested state;

若否,则接收所述数据包,从所述数据包中提取出所述业务报文的报文头数据,将所述报文头数据写入所述中央处理器的高速缓存,将除所述报文头数据之外的所述数据包写入所述双倍速率同步动态随机存储器;If not, then receive the data packet, extract the message header data of the service message from the data packet, write the message header data into the cache memory of the central processing unit, and remove all Writing the data packets other than the header data into the double rate synchronous dynamic random access memory;

若是,则接收所述数据包,将所述数据包写入所述双倍速率同步动态随机存储器。If yes, the data packet is received, and the data packet is written into the double rate synchronous dynamic random access memory.

进一步地,所述接收所述数据包的步骤,包括:Further, the step of receiving the data packet includes:

采用直接内存访问,接收外部设备发送的业务报文的数据包,并将一个DMA描述符的状态值从第一状态值更新为第二状态值;Using direct memory access, receiving a data packet of a service message sent by an external device, and updating a state value of a DMA descriptor from a first state value to a second state value;

其中,所述第一状态值表征处于未完成报文数据接收状态,所述第二状态值表征处于报文数据接收完成状态;Wherein, the first status value indicates that the message data is in an unfinished state, and the second status value indicates that the message data is received in a completed state;

在所述将除所述报文头数据之外的所述数据包写入所述双倍速率同步动态随机存储器的步骤之前,或者在所述将所述数据包写入所述双倍速率同步动态随机存储器的步骤之前,所述方法还包括:Before the step of writing the data packet except the header data into the double-rate synchronous DRAM, or before the step of writing the data packet into the double-rate synchronous Before the step of DRAM, the method also includes:

在所述双倍速率同步动态随机存储器中,确定出存储所述数据包的存储区域的数据地址。In the double rate synchronous dynamic random access memory, determine the data address of the storage area for storing the data packet.

进一步地,所述判断当前收包是否处于拥塞状态的步骤,包括:Further, the step of judging whether the current packet receiving is in a congested state includes:

从所有的DMA描述符中,确定出表征处于报文数据接收完成状态的描述符总数;From all the DMA descriptors, determine the total number of descriptors that represent the completion of message data reception;

判断所述描述符总数是否超过预设的门槛阈值,若是,则判定当前收包处于拥塞状态,若否,则判定当前收包未处于拥塞状态。Judging whether the total number of descriptors exceeds a preset threshold, if yes, then judging that the current packet receiving is in a congested state, if not, then judging that the current packet receiving is not in a congested state.

进一步地,所述将所述报文头数据写入所述中央处理器的高速缓存的步骤,包括:Further, the step of writing the header data into the cache of the central processing unit includes:

将所述报文头数据及数据地址发送至总线;其中,所述数据地址为所述双倍速率同步动态随机存储器中存储所述数据包的存储区域的地址;Sending the header data and the data address to the bus; wherein the data address is the address of the storage area for storing the data packet in the double rate synchronous dynamic random access memory;

通过所述总线,根据所述数据地址,将所述报文头数据存入所述中央处理器的高速缓存中已分配的特定区域。Through the bus, according to the data address, the header data is stored in the allocated specific area in the cache memory of the central processing unit.

进一步地,在所述将所述报文头数据及数据地址发送至总线的步骤之前,所述方法包括:Further, before the step of sending the header data and data address to the bus, the method includes:

从所述中央处理器的高速缓存中,为所述报文头数据分配出空闲的特定区域。A free specific area is allocated for the packet header data from the cache memory of the central processing unit.

进一步地,所述从所述数据包中提取出所述业务报文的报文头数据的步骤,包括:Further, the step of extracting the header data of the service message from the data packet includes:

以所述数据包的起始字段作为报文头起点,从所述数据包中提取出长度为预设长度的数据作为报文头数据。Taking the start field of the data packet as the starting point of the message header, extracting data with a preset length from the data packet as the message header data.

第二方面,本发明实施例提供一种报文处理方法,应用于网络设备,所述网络设备包括中央处理器和双倍速率同步动态随机存储器,所述方法包括:In a second aspect, an embodiment of the present invention provides a message processing method, which is applied to a network device, where the network device includes a central processing unit and a double-rate synchronous dynamic random access memory, and the method includes:

轮询DMA描述符,若当前轮询的DMA描述符为第二状态值,则从所述DMA描述符中获取数据地址,并确定所述DMA描述符所对应的业务报文;其中,所述第二状态值表征处于报文数据接收完成状态;Polling the DMA descriptor, if the currently polled DMA descriptor is the second state value, then obtain the data address from the DMA descriptor, and determine the service message corresponding to the DMA descriptor; wherein, the The second status value indicates that it is in the status of message data receiving completion;

识别所述中央处理器的高速缓存中是否存在所述业务报文的报文头数据,若是,则对所述高速缓存中的报文头数据进行解析识别,并基于识别结果进行查表,确定出转发信息;Identify whether the header data of the service message exists in the cache of the central processing unit, if so, analyze and identify the header data in the cache, and perform table lookup based on the identification result to determine forwarding information;

从所述双倍速率同步动态随机存储器中所述数据地址对应的存储区域中获取所述业务报文的剩余数据,对所述剩余数据进行编辑,得到待转发报文;Obtaining the remaining data of the service message from the storage area corresponding to the data address in the double-rate synchronous dynamic random access memory, editing the remaining data, and obtaining the message to be forwarded;

基于所述转发信息,将所述待转发报文转发至下一跳设备,将所述DMA描述符置为第一状态值,并释放所述DMA描述符中的数据地址。Based on the forwarding information, forward the message to be forwarded to a next-hop device, set the DMA descriptor to a first state value, and release the data address in the DMA descriptor.

第三方面,本发明实施例提供一种报文处理装置,应用于网络设备,所述网络设备包括中央处理器和双倍速率同步动态随机存储器,所述报文处理装置包括拥塞判断模块和存储模块;In the third aspect, the embodiment of the present invention provides a message processing device, which is applied to network equipment, and the network device includes a central processing unit and a double-rate synchronous dynamic random access memory, and the message processing device includes a congestion judging module and a memory module;

所述拥塞判断模块,用于监测到外部设备开始发送业务报文的数据包时,判断当前收包是否处于拥塞状态;The congestion judging module is used to judge whether the current receiving packet is in a congested state when it detects that the external device starts to send the data packet of the service message;

所述存储模块,用于若否,则接收所述数据包,从所述数据包中提取出所述业务报文的报文头数据,将所述报文头数据写入所述中央处理器的高速缓存,将除所述报文头数据之外的所述数据包写入所述双倍速率同步动态随机存储器;The storage module is configured to, if not, receive the data packet, extract the header data of the service message from the data packet, and write the header data into the central processing unit cache, writing the data packet except the header data into the double rate synchronous dynamic random access memory;

所述存储模块,还用于若是,则接收所述数据包,将所述数据包写入所述双倍速率同步动态随机存储器。The storage module is further configured to receive the data packet if yes, and write the data packet into the double rate synchronous dynamic random access memory.

第四方面,本发明实施例提供一种电子设备,包括处理器和存储器,所述存储器存储有能够被所述处理器执行的机器可执行指令,所述处理器可执行所述机器可执行指令以实现如第一方面或第二方面所述的报文处理方法。In a fourth aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, the memory stores machine-executable instructions that can be executed by the processor, and the processor can execute the machine-executable instructions In order to realize the packet processing method described in the first aspect or the second aspect.

第五方面,本发明实施例提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面或第二方面所述的报文处理方法。In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the message processing method as described in the first aspect or the second aspect is implemented.

本发明实施例提供的报文处理方法、装置、电子设备及计算机可读存储介质,网络设备在监测到外部设备开始发送业务报文的数据包时,在当前收包处于拥塞状态的情况下,将数据包写入双倍速率同步动态随机存储器,在当前收包未处于拥塞状态的情况下,将数据包中的报文头数据直接写入中央处理器的高速缓存中,将报文头数据之外的其他数据写入双倍速率同步动态随机存储器,从而使得中央处理器处理该业务报文时,报文头数据已经在高速缓存中,无需再去访问双倍速率同步动态随机存储器来获取报文头数据,能够有效减轻中央处理器对双倍速率同步动态随机存储器的访存压力,进而能够提升软转发的整体性能。In the message processing method, device, electronic device, and computer-readable storage medium provided by the embodiments of the present invention, when the network device detects that the external device starts to send the data packet of the service message, when the current receiving packet is in a congested state, Write the data packet into the double-rate synchronous dynamic random access memory. When the current packet receiving is not in a congested state, write the header data in the packet directly into the cache memory of the central processing unit, and write the header data into the cache of the central processing unit. Write other data other than the double-rate synchronous dynamic random access memory, so that when the central processor processes the service message, the header data is already in the cache, and there is no need to access the double-rate synchronous dynamic random access memory to obtain The packet header data can effectively reduce the memory access pressure of the central processing unit on the double-rate synchronous dynamic random access memory, thereby improving the overall performance of soft forwarding.

为使本发明的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present invention more comprehensible, preferred embodiments will be described in detail below together with the accompanying drawings.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本发明的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention, and thus It should be regarded as a limitation on the scope, and those skilled in the art can also obtain other related drawings based on these drawings without creative work.

图1示出了本发明实施例提供的报文处理系统的方框示意图。FIG. 1 shows a schematic block diagram of a packet processing system provided by an embodiment of the present invention.

图2示出了本发明实施例提供的报文处理方法的流程示意图之一。FIG. 2 shows one of the schematic flowcharts of the message processing method provided by the embodiment of the present invention.

图3示出了本发明实施例提供的报文处理方法的流程示意图之二。FIG. 3 shows the second schematic flowchart of the message processing method provided by the embodiment of the present invention.

图4示出了图2或图3中步骤S12的部分子步骤的流程示意图。FIG. 4 shows a schematic flowchart of some sub-steps of step S12 in FIG. 2 or FIG. 3 .

图5示出了图2或图3中步骤S14的部分子步骤的流程示意图之一。FIG. 5 shows one of the schematic flowcharts of some sub-steps of step S14 in FIG. 2 or FIG. 3 .

图6示出了本发明实施例提供的网络设备对报文处理的结构示意图。FIG. 6 shows a schematic structural diagram of packet processing by a network device provided by an embodiment of the present invention.

图7示出了图5示出了图2或图3中步骤S14的部分子步骤的流程示意图之二。FIG. 7 shows the second schematic flowchart of some sub-steps of step S14 in FIG. 2 or FIG. 3 shown in FIG. 5 .

图8示出了本发明实施例提供的报文处理方法的流程示意图之三。FIG. 8 shows the third schematic flowchart of the packet processing method provided by the embodiment of the present invention.

图9示出了本发明实施例提供的报文处理装置的方框示意图。FIG. 9 shows a schematic block diagram of a packet processing device provided by an embodiment of the present invention.

图10示出了本发明实施例提供的电子设备的方框示意图。Fig. 10 shows a schematic block diagram of an electronic device provided by an embodiment of the present invention.

附图标记:100-报文处理系统;110-网络设备;120-外部设备;130-报文处理装置;140-拥塞判断模块;150-存储模块;160-轮询模块;170-识别模块;180-编辑模块;190-转发模块;200-电子设备。Reference signs: 100-message processing system; 110-network equipment; 120-external equipment; 130-message processing device; 140-congestion judgment module; 150-storage module; 160-polling module; 170-identification module; 180-editing module; 190-forwarding module; 200-electronic equipment.

具体实施方式Detailed ways

下面将结合本发明实施例中附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本发明实施例的组件可以以各种不同的配置来布置和设计。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. The components of the embodiments of the invention generally described and illustrated in the figures herein may be arranged and designed in a variety of different configurations.

因此,以下对在附图中提供的本发明的实施例的详细描述并非旨在限制要求保护的本发明的范围,而是仅仅表示本发明的选定实施例。基于本发明的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。Accordingly, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts belong to the protection scope of the present invention.

需要说明的是,术语“第一”和“第二”等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that relative terms such as the terms "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any relationship between these entities or operations. There is no such actual relationship or order between them. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

在报文的软转发场景中,由于业务复杂,通常采用由软件来进行业务报文的识别查找处理、报文编辑和报文转发。In the soft forwarding scenario of packets, due to the complexity of services, software is usually used to identify, search, process, edit, and forward service packets.

由于业务报文的软件处理复杂(即软转发),业务表项庞大,软转发过程中通常包括以下流程:通过硬件完成线路侧报文接收和上送;将报文存入存储器件,比如DRAM;软件感知报文接收;软件解析存储于存储器件中的报文;根据解析结果,进行业务查表,并对报文进行业务处理和编辑,例如流学习、统计、深度解析、安全策略和加解密;根据查表结果,对处理和编辑结束后的报文按转发决策进行转发,完成报文发送。Due to the complex software processing of service packets (ie soft forwarding) and the huge number of service entries, the soft forwarding process usually includes the following processes: receiving and sending packets on the line side through hardware; storing the packets in storage devices, such as DRAM ;Software-aware message reception; software parses the message stored in the storage device; according to the analysis result, perform business lookup table, and perform business processing and editing on the message, such as flow learning, statistics, in-depth analysis, security policy and processing Decryption; according to the table lookup result, forward the processed and edited message according to the forwarding decision, and complete the message sending.

目前的业务报文的软转发方法中,DMA控制器先将报文的数据包写入到DDR,写完报文后,更新DMA描述符或更新DMA描述符同时提供中断,CPU通过轮询DMA描述符或DMA提供的中断感知报文接收,之后CPU按DMA描述符取得报文数据地址,从DDR读取报文数据,进而对报文数据进行解析和转发。但是,由于CPU读取DDR的时延较长,在取回数据前CPU无法继续处理接收到的报文,导致CPU资源空耗,整体性能大幅下降。In the current soft forwarding method of service messages, the DMA controller first writes the data packet of the message to the DDR. After writing the message, it updates the DMA descriptor or updates the DMA descriptor and provides an interrupt at the same time. The CPU polls the DMA The interrupt-aware message provided by the descriptor or DMA is received, and then the CPU obtains the address of the message data according to the DMA descriptor, reads the message data from the DDR, and then parses and forwards the message data. However, due to the long delay for the CPU to read the DDR, the CPU cannot continue to process the received packets before retrieving the data, resulting in CPU resource consumption and a significant drop in overall performance.

在现有的另一种方法中,通常将部分关键业务卸载到硬件中执行,解析查表报文编辑。但是,路由器业务规格较大,因此需要将硬件表项存放SRAM,因此硬件成本较高。此外,这种方法只能卸载一部分业务,大量的业务表项依旧存放于DDR上,使得DDR上的表项条目可以轻易达到M级别,甚至是G级别,而存放于DDR中的大部分业务依旧只能上送CPU处理。因此,依旧存在CPU资源空耗,整体性能大幅下降的问题。In another existing method, part of the key business is usually offloaded to the hardware for execution, and the table lookup message is parsed and edited. However, the router has a large service specification, so hardware entries need to be stored in the SRAM, so the hardware cost is relatively high. In addition, this method can only offload a part of the business, and a large number of business entries are still stored on the DDR, so that the entries on the DDR can easily reach the M level, or even the G level, while most of the services stored in the DDR are still It can only be sent to the CPU for processing. Therefore, there is still the problem of empty CPU resources and a sharp drop in overall performance.

基于上述考虑,本发明实施例提供一种报文处理方法,其能够改善目前的报文软转发方法所导致的CPU资源空耗、整体性能大幅下降的问题。以下,对该方案进行介绍。Based on the above considerations, an embodiment of the present invention provides a packet processing method, which can improve the problems of CPU resource consumption and overall performance degradation caused by the current packet soft forwarding method. Hereinafter, this plan will be introduced.

本发明实施例提供的报文处理方法,可以应用于图1所示的报文处理系统中,该报文处理系统100可以包括网络设备110和多个外部设备120,网络设备110可以通过网络与多个外部设备120通信连接,且网络设备110可以包括中央处理器和双倍速率同步动态随机存储器。The message processing method provided by the embodiment of the present invention can be applied to the message processing system shown in FIG. 1. The message processing system 100 can include a network device 110 and a plurality of external devices 120. A plurality of external devices 120 are connected in communication, and the network device 110 may include a central processing unit and a double-rate synchronous dynamic random access memory.

外部设备120,可以用于发送业务报文的数据包至网络设备110。The external device 120 may be configured to send a data packet of a service message to the network device 110 .

网络设备110,用于监测到外部设备120开始发送业务报文的数据包时,判断当前收包是否处于拥塞状态,若否,则接收数据包,从数据包中提取出业务报文的报文头数据,将报文头数据写入中央处理器的高速缓存,将除报文头数据之外的数据包写入双倍速率同步动态随机存储器。The network device 110 is used to determine whether the current receiving packet is in a congested state when it detects that the external device 120 starts to send the data packet of the service message, if not, then receives the data packet, and extracts the message of the service message from the data packet header data, write the message header data into the cache memory of the central processing unit, and write the data packets except the message header data into the double-rate synchronous dynamic random access memory.

其中,网络设备110包括但不限于是:交换机、网关、终端设备和服务器等。同理,外部设备120可以包括但不限于是:独立服务器、服务器集群、终端设备、可穿戴式便携设备、个人计算机、笔记本电脑、移动终端、交换机和网关等。Wherein, the network device 110 includes, but is not limited to: a switch, a gateway, a terminal device, a server, and the like. Similarly, the external device 120 may include, but is not limited to: an independent server, a server cluster, a terminal device, a wearable portable device, a personal computer, a notebook computer, a mobile terminal, a switch, a gateway, and the like.

在一种可能的实施方式中,本发明实施例提供一种报文处理方法,参照图2,该报文处理方法可以包括以下步骤。在本实施方式中,以该报文处理方法应用于图1中的网络设备110来举例说明。In a possible implementation manner, an embodiment of the present invention provides a packet processing method. Referring to FIG. 2 , the packet processing method may include the following steps. In this implementation manner, it is described by taking the packet processing method applied to the network device 110 in FIG. 1 as an example.

S12,监测到外部设备开始发送业务报文的数据包时,判断当前收包是否处于拥塞状态。若否,则执行步骤S14,若是,则执行步骤S16。S12. When it is detected that the external device starts to send the data packet of the service message, it is judged whether the current receiving packet is in a congested state. If not, execute step S14, and if yes, execute step S16.

需要说明的是,在本实施方式中,接收完数据包指的是接收到数据包,但未存入任一存储器件内。当前收包指的是报文接收、报文存储以及报文转发的一系列处理流程。It should be noted that, in this embodiment, the data packet has been received means that the data packet has been received but not stored in any storage device. The current packet receiving refers to a series of processing procedures of packet receiving, packet storage, and packet forwarding.

S14,接收数据包,从数据包中提取出业务报文的报文头数据,将报文头数据写入中央处理器的高速缓存,将除报文头数据之外的数据包写入双倍速率同步动态随机存储器。S14, receiving the data packet, extracting the message header data of the service message from the data packet, writing the message header data into the cache memory of the central processing unit, and writing the data packets other than the message header data into double rate synchronous DRAM.

S16,接收数据包,将数据包写入双倍速率同步动态随机存储器。S16, receiving the data packet, and writing the data packet into the double rate synchronous dynamic random access memory.

网络设备110在监测到任一外部设备120开始发送一个业务报文的数据包,且还未将该数据包进行接收存储时,若网络设备110的当前收包业务未处于拥塞状态,则从数据包中提取出报文头数据,将报文头数据直接写入中央处理器的高速缓存中,并将数据包中除报文头数据之外的报文体数据(在本实施方式中,报文体数据指的是数据包中除报文头数据之外的数据)写入双倍速率同步动态随机存储器。若网络设备110的当前收包业务处于拥塞状态,则数据包全部写入双倍速率同步动态随机存储器。When the network device 110 detects that any external device 120 starts to send a data packet of a service message, and the data packet has not been received and stored, if the current packet receiving service of the network device 110 is not in a congested state, the Extract the message header data in the packet, write the message header data directly in the cache memory of the central processing unit, and write the message body data (in this embodiment, the message body) except the message header data in the data packet The data refers to the data except the header data in the data packet) written into the double-rate synchronous dynamic random access memory. If the current packet receiving service of the network device 110 is in a congested state, all data packets are written into the double-rate synchronous DRAM.

与传统的报文软转发方法相比,本发明实施例提供的报文处理方法,在当前收包未处于拥塞状态时,直接将接收的业务报文的报文头数据写入中央处理器的高速缓存,从而中央处理器处理该业务报文时,报文头数据已经在高速缓存中,无需再去访问双倍速率同步动态随机存储器来获取报文头数据,能够有效减轻中央处理器对双倍速率同步动态随机存储器的访存压力,进而能够提升软转发的整体性能。Compared with the traditional message soft forwarding method, the message processing method provided by the embodiment of the present invention directly writes the message header data of the received service message into the central processing unit when the current packet receiving is not in a congested state High-speed cache, so that when the central processor processes the service message, the header data is already in the cache, and there is no need to access the double-speed synchronous dynamic random access memory to obtain the header data, which can effectively reduce the central processor's double Double rate synchronous DRAM access pressure, which can improve the overall performance of soft forwarding.

为了使报文的软转发更为高效地实现,在一种可能的实施方式中,引入直接内存访问和DMA描述符,网络设备110中预先设置有一定数量的DMA描述符。DMA描述符可以包括但不限于是:用于表征业务报文的处理状态的状态值,以及用于记录业务报文的数据包的存储区域的数据地址。In order to implement soft forwarding of packets more efficiently, in a possible implementation manner, direct memory access and DMA descriptors are introduced, and a certain number of DMA descriptors are preset in the network device 110 . The DMA descriptor may include, but is not limited to: a status value used to represent the processing status of the service message, and a data address of a storage area used to record the data packet of the service message.

例如,状态值可以包括第一状态值“0”和第二状态值“1”,第一状态值“0”表征处于未完成报文数据接收状态,第二状态值“1”表征处于报文数据接收完成状态。当状态值为第一状态值“0”时,DMA描述符中的数据地址为空。当状态值为第二状态值“1”时,DMA描述符中的数据地址不为空,表征该数据地址对应的报文数据处于待处理、待编辑和待转发状态。For example, the state value may include a first state value "0" and a second state value "1". Data receiving completion status. When the status value is the first status value "0", the data address in the DMA descriptor is empty. When the state value is the second state value "1", the data address in the DMA descriptor is not empty, which means that the packet data corresponding to the data address is in the state of waiting to be processed, edited and forwarded.

需要说明的是,网络设备110中的所有DMA描述符间可以具有顺序关系,且可以为循环式顺序,每个DMA描述符可以记录有其之后的描述符的标识或地址。以共有3个序号分别为1,2,3的DMA描述符为例,序号为1的DMA描述符中记录有序号为2的DMA描述符的标识或地址,序号为2的DMA描述符中记录有序号为3的DMA描述符的标识或地址,序号为3的DMA描述符中记录有序号为1的DMA描述符的标识或地址,以构成循环式顺序。It should be noted that all DMA descriptors in the network device 110 may have a sequence relationship, and may be in a circular order, and each DMA descriptor may record the identifier or address of the subsequent descriptor. Take a total of three DMA descriptors with serial numbers 1, 2, and 3 as an example. The DMA descriptor with serial number 1 records the identifier or address of the DMA descriptor with serial number 2, and the DMA descriptor with serial number 2 records The identifier or address of the DMA descriptor with the sequence number 3, and the identifier or address of the DMA descriptor with the sequence number 1 is recorded in the DMA descriptor with the sequence number 3, so as to form a circular sequence.

进一步地,参照图3,步骤S14和S16中,接收数据包可以进一步实施为:采用直接内存访问,接收外部设备发送的业务报文的数据包,并将一个DMA描述符的状态值从第一状态值更新为第二状态值。Further, referring to FIG. 3, in steps S14 and S16, receiving the data packet may be further implemented as: using direct memory access, receiving the data packet of the service message sent by the external device, and changing the state value of a DMA descriptor from the first The state value is updated to the second state value.

在本实施方式中,第一状态值表征处于未完成报文数据接收状态,第二状态值表征处于报文数据接收完成状态。且,步骤S14可以包括步骤S141和步骤S142,步骤S16可以包括步骤S161和步骤S162。In this embodiment, the first status value indicates that the message data is in an unfinished state, and the second status value indicates that the message data reception is completed. Moreover, step S14 may include step S141 and step S142, and step S16 may include step S161 and step S162.

S141,采用直接内存访问,接收外部设备发送的业务报文的数据包,并将一个DMA描述符的状态值从第一状态值更新为第二状态值。S141. Using direct memory access, receive a data packet of a service message sent by an external device, and update a state value of a DMA descriptor from a first state value to a second state value.

S142,从数据包中提取出业务报文的报文头数据,将报文头数据写入中央处理器的高速缓存,将除报文头数据之外的数据包写入双倍速率同步动态随机存储器。S142, extracting the message header data of the service message from the data packet, writing the message header data into the cache memory of the central processing unit, and writing the data packets other than the message header data into the double-rate synchronous dynamic random memory.

S161,采用直接内存访问,接收外部设备发送的业务报文的数据包,并将一个DMA描述符的状态值从第一状态值更新为第二状态值。S161. Using direct memory access, receive a data packet of a service message sent by an external device, and update a state value of a DMA descriptor from a first state value to a second state value.

S162,将数据包写入双倍速率同步动态随机存储器。S162, writing the data packet into the double rate synchronous dynamic random access memory.

直接内存访问(Direct Memory Access,DMA),即网络设备110通过DMA RING接收外部设备120发送的业务报文的数据包。Direct memory access (Direct Memory Access, DMA), that is, the network device 110 receives a data packet of a service message sent by the external device 120 through the DMA RING.

应当理解的是,在步骤S141和步骤S161中所选择的DMA描述符为状态值为第一状态值的DMA描述符。选择DMA描述符的方式可以灵活选择,例如,可以是状态值为第二状态值的DMA描述符之后的第一个状态值为第一状态值的DMA描述符,也可以是从状态值为第一状态值的所有DMA描述中随机选择的一个DMA描述符,在本实施方式中,不作具体限定。It should be understood that the DMA descriptor selected in step S141 and step S161 is a DMA descriptor with a state value of the first state value. The way to select the DMA descriptor can be flexibly selected. For example, it can be a DMA descriptor with the first state value after the DMA descriptor whose state value is the second state value, or a DMA descriptor whose state value is the first state value. A DMA descriptor randomly selected from all DMA descriptions of a state value is not specifically limited in this embodiment.

进一步地,在上述步骤S142中,将除报文头数据之外的数据包写入双倍速率同步动态随机存储器之前,以及在步骤S16中,将将数据包写入双倍速率同步动态随机存储器之前,还可以包括:在双倍速率同步动态随机存储器中,确定出存储数据包的存储区域的数据地址。Further, in the above-mentioned step S142, before the data packets other than the header data are written into the double-rate synchronous dynamic random access memory, and in step S16, the data packets are written into the double-rate synchronous dynamic random access memory Before, it may also include: determining the data address of the storage area for storing the data packet in the double rate synchronous dynamic random access memory.

网络设备110可以通过监测或记录的方式,确定双倍速率同步动态随机存储器中空闲的存储区域,从而通过长度匹配、按序存放等任一种存储方式,从双倍速率同步动态随机存储器的所有空闲的存储区域,确定出用于存储整个数据包或数据包中的报文体数据的存储区域。The network device 110 can determine the free storage area in the double-rate synchronous DRAM by means of monitoring or recording, so that all storage areas in the double-rate synchronous DRAM can be obtained from any storage method such as length matching and sequential storage. The free storage area determines the storage area used to store the entire data packet or the message body data in the data packet.

需要说明的是,步骤S141和步骤S161中的DMA描述符中可以包括存储数据包或数据包中的报文头数据的存储区域的数据地址,该存储区域可以是在确定出存储区域的数据地址时,由硬件实时写入该DMA描述符中,也可以是提前写入至DMA描述符中的。对于数据地址提前写入至DMA描述符中的情况,可以是在DMA描述符从第二状态值切换为第一状态值时,由CPU或者硬件从双倍速率同步动态随机存储器的所有空闲的存储区域中随机确定出一个存储区域后,将该存储区域的数据地址填入DMA描述符中。It should be noted that the DMA descriptor in step S141 and step S161 may include the data address of the storage area for storing the data packet or the header data in the data packet, and the storage area may be the data address of the storage area determined , it is written into the DMA descriptor by the hardware in real time, or it can be written into the DMA descriptor in advance. For the case where the data address is written into the DMA descriptor in advance, it can be that when the DMA descriptor is switched from the second state value to the first state value, all idle storage of the DRAM is synchronized from the double rate by the CPU or hardware After a storage area is randomly determined in the area, the data address of the storage area is filled in the DMA descriptor.

对于每一个外部设备120发送的业务报文,均有一个对应的DMA描述符记录该业务报文的存储区域和状态值等信息。For each service message sent by the external device 120, there is a corresponding DMA descriptor to record information such as the storage area and status value of the service message.

在一种可能的实施方式中,为了快速且准确地确定当前收包的状态,引入门槛阈值,DMA RING上可以预先配置有门槛阈值,即Threshold。在此基础上,参照图4,可以通过以下步骤判断当前收包是否处于拥塞状态。In a possible implementation manner, in order to quickly and accurately determine the current state of receiving packets, a threshold is introduced, and the DMA RING may be pre-configured with a threshold, that is, Threshold. On this basis, referring to FIG. 4 , it can be judged whether the current packet receiving is in a congested state through the following steps.

S121,从所有的DMA描述符中,确定出表征处于报文数据接收完成状态的描述符总数。S121. From all the DMA descriptors, determine the total number of descriptors indicating that the message data reception is completed.

S122,判断描述符总数是否超过预设的门槛阈值。若是,则执行步骤S123,若否,则执行步骤S124。S122. Determine whether the total number of descriptors exceeds a preset threshold. If yes, execute step S123; if not, execute step S124.

S123,判定当前收包处于拥塞状态。S123. Determine that the current packet receiving is in a congested state.

S124,判定当前收包未处于拥塞状态。S124. Determine that the current packet receiving is not in a congested state.

从网络设备110上配置的所有DMA描述符中,确定状态值为第二状态值的DMA描述符的总数作为描述符总数,当描述符总数小于或等于门槛阈值时,则当前收包不是拥塞状态(burst状态),即中央处理器对双倍速率同步动态随机存储器的访存还未到访存上限,否则,当前收包是拥塞状态,即中央处理器对双倍速率同步动态随机存储器的访存已达到访存上限。From all DMA descriptors configured on the network device 110, determine the total number of DMA descriptors whose state value is the second state value as the total number of descriptors. When the total number of descriptors is less than or equal to the threshold threshold, the current packet receiving is not in a congestion state (burst state), that is, the central processing unit has not yet reached the upper limit of memory access to the double-rate synchronous dynamic random access memory, otherwise, the current receiving packet is a congestion state, that is, the central processing unit accesses the double-rate synchronous dynamic random access memory The memory access limit has been reached.

针对步骤S14,从数据包中提取出报文头数据的方式可以灵活选择,例如,可以将指定字段作为报文头数据,也可以将预设长度的字段作为报文头数据,在本实施方式中,不作具体限定。For step S14, the method of extracting the header data from the data packet can be flexibly selected. For example, the specified field can be used as the header data, or a field with a preset length can be used as the header data. In this embodiment , without specific limitations.

在一种可能的实施方式中,从数据包中提取出业务报文的报文头数据可以进一步实施为:以数据包的起始字段作为报文头起点,从数据包中提取出长度为预设长度的数据作为报文头数据。In a possible implementation manner, extracting the message header data of the service message from the data packet can be further implemented as: taking the start field of the data packet as the starting point of the message header, and extracting Set the length of the data as the header data.

数据包中除报文头之外的数据即为业务报文的报文体数据。The data in the data packet except the message header is the message body data of the service message.

进一步地,针对步骤S142,参照图5,将报文头数据写入中央处理器的高速缓存可以通过以下步骤实现。Further, for step S142, referring to FIG. 5 , writing the packet header data into the cache memory of the central processing unit may be implemented through the following steps.

S1422,将报文头数据及数据地址发送至总线。S1422. Send the packet header data and data address to the bus.

需要说明的是,数据地址为双倍速率同步动态随机存储器中存储所述数据包的存储区域的地址。It should be noted that the data address is an address of a storage area in the double-rate synchronous DRAM for storing the data packet.

S1424,通过总线,根据数据地址,将报文头数据存入中央处理器的高速缓存中已分配的特定区域。S1424. Store the packet header data in the allocated specific area in the cache memory of the central processing unit according to the data address through the bus.

总线接收到数据地址和报文头数据之后,根据数据地址,将报文头数据存入中央处理器的高速缓存中已分配的特定区域。After the bus receives the data address and the packet header data, according to the data address, the packet header data is stored in the allocated specific area in the cache memory of the central processing unit.

参照图6,中央处理器可以包括多个核心,每个核心可以包括多个缓存区(又可称为缓存行,Cache Line),每个缓存行可以存储一定长度的数据。Referring to FIG. 6 , the central processing unit may include multiple cores, and each core may include multiple cache areas (also called cache lines, Cache Lines), and each cache line may store data of a certain length.

针对步骤S1422,针对每个业务报文的报文头数据,当报文头数据的长度超过一个缓存行的长度时,DMA控制器可以通过将报文头数据分成多段数据,从而通过一次发送一段数据的方式,DMA控制器通过多次传输,向总线发送数据地址和报文头数据。例如,DMA控制器可以通过ARM的典型实体,即ACE5-LiteACP Master接口,向总线发送数据地址和报文头数据。For step S1422, for the message header data of each service message, when the length of the message header data exceeds the length of a cache line, the DMA controller can divide the message header data into multiple pieces of data, thereby sending one section at a time In the way of data, the DMA controller sends the data address and header data to the bus through multiple transfers. For example, the DMA controller can send the data address and header data to the bus through the typical entity of ARM, that is, the ACE5-LiteACP Master interface.

总线接收到数据地址和报文头数据之后,根据数据地址以缓存行为单位将报文头数据通过CPU侧接口(例如,可以是ARM的典型实体ACE5-LiteACP Slave接口)写入CPU的高速缓存(Cache)中分配好的特定区域。After the bus receives the data address and the header data, the header data is written into the CPU's cache ( Cache) in the allocated specific area.

进一步地,参照图7,在步骤S142之前,还可以包括步骤S141。Further, referring to FIG. 7, before step S142, step S141 may also be included.

S1421,从中央处理器的高速缓存中,为报文头数据分配出空闲的特定区域。S1421. Allocate a free specific area for the packet header data from the cache memory of the central processing unit.

为报文头数据分配出空闲的特定区域的方式可以灵活设置,例如,可以由中央处理器从高速缓存中未存储有数据的区域中随机选择,也可以在DMA RING接收到业务报文的数据包时,DMA RING可以根据对高速缓存的监测结果,从高速缓存中未存储有数据的区域分配出特定区域。在本实施方式中,不作具体限定。The method of allocating a free specific area for the header data can be flexibly set, for example, the central processor can randomly select from the area where no data is stored in the cache, or the data of the service message can be received in the DMA RING DMA RING can allocate a specific area from the area where data is not stored in the cache according to the monitoring results of the cache. In this embodiment, it is not specifically limited.

在一种可能的实施方式中,DMA RING或中央处理器确定出为报文头数据分配出空闲的特定区域时,可以将特定区域的缓存地址与存储报文体数据的存储区域的数据地址以配对关系通知至总线,从而总线在接收到数据地址和报文头数据时,可以根据数据地址确定出与该数据地址配对的缓存地址,并将报文头数据写入高速缓存中该缓存地址对应的缓存区域。In a possible implementation, when the DMA RING or the central processor determines that a free specific area is allocated for the header data, the cache address of the specific area can be paired with the data address of the storage area for storing the message body data The relationship is notified to the bus, so that when the bus receives the data address and message header data, it can determine the cache address paired with the data address according to the data address, and write the message header data into the cache corresponding to the cache address cache area.

本发明实施例提供的上述报文处理方法中,根据DMA RING的未处理的DMA描述符的积压数量,以及预先配置的门槛阈值判定当前收包是否处于拥塞状态,进而在非拥塞状态,通过总线指令在收包时将对应的报文头数据直接写入到CPU的高速缓存中,从而CPU在感知到报文接收的时候,报文头数据已经在CPU的高速缓存中,无需通过访问DDR来获取报文头是数据,可以有效减少CPU处理报文时的访存时延,从而极大地提高软转发效率,提升整体转发带宽和转发性能。In the above message processing method provided by the embodiment of the present invention, according to the backlog of unprocessed DMA descriptors of DMA RING and the pre-configured threshold threshold, it is determined whether the current received packet is in a congested state, and then in a non-congested state, through the bus The instruction writes the corresponding packet header data directly into the CPU cache when receiving the packet, so that when the CPU perceives that the packet is received, the packet header data is already in the CPU cache, and there is no need to access the DDR to Obtaining the packet header is the data, which can effectively reduce the memory access delay when the CPU processes the packet, thereby greatly improving the soft forwarding efficiency and improving the overall forwarding bandwidth and forwarding performance.

在一种可能的实施方式中,本发明实施例还提供一种报文处理方法,参照图8,可以包括以下步骤。在本实施方式中,该报文处理方法可以应用于图1中的网络设备110。并且,此时的网络设备110采用上述实施方式提供的报文处理方法对外部设备120发送的业务报文的数据包进行了存储。In a possible implementation manner, an embodiment of the present invention further provides a packet processing method, referring to FIG. 8 , which may include the following steps. In this implementation manner, the packet processing method may be applied to the network device 110 in FIG. 1 . Moreover, the network device 110 at this time stores the data packets of the service messages sent by the external device 120 by using the message processing method provided in the above-mentioned embodiment.

S21,轮询DMA描述符,若当前轮询的DMA描述符为第二状态值,则从DMA描述符中获取数据地址,并确定DMA描述符所对应的业务报文。S21. Poll the DMA descriptor. If the currently polled DMA descriptor is the second state value, obtain a data address from the DMA descriptor, and determine a service packet corresponding to the DMA descriptor.

其中,第二状态值表征处于报文数据接收完成状态。在获取数据地址之后,即可确定出该DMA描述符所对应的业务报文。Wherein, the second status value indicates that it is in the status of receiving the message data. After the data address is obtained, the service message corresponding to the DMA descriptor can be determined.

S23,识别中央处理器的高速缓存中是否存在业务报文的报文头数据,若是,则对高速缓存中的报文头数据进行解析识别,并基于识别结果进行查表,确定出转发信息。S23. Identify whether the header data of the service message exists in the cache of the central processing unit. If yes, analyze and identify the header data in the cache, and perform table lookup based on the identification result to determine forwarding information.

S25,从双倍速率同步动态随机存储器中数据地址对应的存储区域中获取业务报文的剩余数据,对剩余数据进行编辑,得到待转发报文。S25. Obtain the remaining data of the service message from the storage area corresponding to the data address in the double-rate synchronous DRAM, edit the remaining data, and obtain the message to be forwarded.

需要说明的是,剩余数据指的是业务报文的数据包中除报文头数据之外的报文体数据。步骤S25和步骤S23可以同时执行,也可以前后执行。It should be noted that the remaining data refers to the message body data in the data packet of the service message except the message header data. Step S25 and step S23 may be executed simultaneously, or may be executed successively.

S27,基于转发信息,将待转发报文转发至下一跳设备,将DMA描述符置为第一状态值,并释放DMA描述符中的数据地址。S27. Based on the forwarding information, forward the packet to be forwarded to the next-hop device, set the DMA descriptor as the first state value, and release the data address in the DMA descriptor.

在本实施方式中,第一状态值表征处于未完成报文数据接收状态。In this embodiment, the first status value indicates that the message data reception is not completed.

针对步骤S23,若否,则从双倍速率同步动态随机存储器(DDR)中数据地址对应的存储区域中获取业务报文的数据包,对数据包进行解析、识别、查表和编辑,得到待转发报文和转发信息,进而基于转发信息,将待转发报文转发至下一跳设备。For step S23, if not, then obtain the data packet of the service message from the storage area corresponding to the data address in the double-rate synchronous dynamic random access memory (DDR), analyze, identify, look up and edit the data packet, and obtain the data packet to be processed. Forward the message and the forwarding information, and then forward the message to be forwarded to the next-hop device based on the forwarding information.

通过上述步骤S21-S27,在当前轮询的DMA描述符的状态值表征处于报文数据接收完成状态,且DMA描述符所描述的报文的报文头数据在CPU的高速缓存中的情况下,网络设备110可以直接对高速缓存中的报文头数据进行处理,得到转发信息,进而基于转发信息,将对该剩余数据进行编辑得到待转发报文进行转发,使得报文转发过程中,网络设备110访问DDR时仅需获取剩余数据,能够有效减轻对DDR的访问压力,从而极大地提升了网络设备110的软转发效率、整体转发带宽和转发性能。Through the above steps S21-S27, when the state value of the currently polled DMA descriptor indicates that it is in the state of message data reception completion, and the message header data of the message described by the DMA descriptor is in the cache of the CPU , the network device 110 can directly process the packet header data in the cache to obtain the forwarding information, and then based on the forwarding information, edit the remaining data to obtain the packet to be forwarded, so that during the packet forwarding process, the network When the device 110 accesses the DDR, it only needs to obtain the remaining data, which can effectively reduce the access pressure on the DDR, thereby greatly improving the soft forwarding efficiency, overall forwarding bandwidth and forwarding performance of the network device 110 .

基于上述报文处理方法相同的发明构思,在一种可能的实施方式中,本发明实施例还提供了一种报文处理装置130,可以应用于图1中的网络设备110。参照图9,该报文处理装置130可以包括拥塞判断模块140和存储模块150。Based on the same inventive concept as the packet processing method above, in a possible implementation manner, an embodiment of the present invention further provides a packet processing apparatus 130, which may be applied to the network device 110 in FIG. 1 . Referring to FIG. 9 , the packet processing device 130 may include a congestion judging module 140 and a storage module 150 .

拥塞判断模块140,用于监测到外部设备开始发送业务报文的数据包时,判断当前收包是否处于拥塞状态。The congestion judging module 140 is configured to judge whether the current packet receiving is in a congested state when it detects that the external device starts to send data packets of service messages.

存储模块150,用于在当前收包未处于拥塞状态的情况下,接收数据包,从数据包中提取出业务报文的报文头数据,将报文头数据写入中央处理器的高速缓存,将除报文头数据之外的数据包写入双倍速率同步动态随机存储器。The storage module 150 is used to receive the data packet when the current packet receiving is not in a congested state, extract the header data of the service message from the data packet, and write the header data into the cache memory of the central processing unit , writing the data packets except the packet header data into the double-rate synchronous dynamic random access memory.

存储模块150,还用于在当前收包处于拥塞状态的情况下,接收数据包,将数据包写入双倍速率同步动态随机存储器。The storage module 150 is also configured to receive data packets and write the data packets into the double-rate synchronous dynamic random access memory (DRAM) when the current packet receiving is in a congested state.

进一步地,报文处理装置130还可以包括轮询模块160、识别模块170、编辑模块180和转发模块190。Further, the packet processing device 130 may further include a polling module 160 , an identification module 170 , an editing module 180 and a forwarding module 190 .

轮询模块160,用于轮询DMA描述符,若当前轮询的DMA描述符为第二状态值,则从DMA描述符中获取数据地址,并确定DMA描述符所对应的业务报文。其中,第二状态值表征处于报文数据接收完成状态。The polling module 160 is configured to poll the DMA descriptor, if the currently polled DMA descriptor is the second state value, obtain the data address from the DMA descriptor, and determine the service message corresponding to the DMA descriptor. Wherein, the second status value indicates that it is in the status of receiving the message data.

识别模块170,用于识别中央处理器的高速缓存中是否存在业务报文的报文头数据,若是,则对所述高速缓存中的报文头数据进行解析识别,并基于识别结果进行查表,确定出转发信息。The identification module 170 is used to identify whether the header data of the service message exists in the cache of the central processing unit, if so, analyze and identify the header data in the cache, and perform table lookup based on the identification result , to determine the forwarding information.

编辑模块180,用于从双倍速率同步动态随机存储器中数据地址对应的存储区域中获取业务报文的剩余数据,对剩余数据进行编辑,得到待转发报文。The editing module 180 is configured to acquire the remaining data of the service message from the storage area corresponding to the data address in the double-rate synchronous dynamic random access memory, edit the remaining data, and obtain the message to be forwarded.

转发模块190,用于基于转发信息,将待转发报文转发至下一跳设备,将DMA描述符置为第一状态值,并释放DMA描述符中的数据地址。其中,第一状态值表征处于未完成报文数据接收状态。The forwarding module 190 is configured to forward the packet to be forwarded to the next-hop device based on the forwarding information, set the DMA descriptor to the first state value, and release the data address in the DMA descriptor. Wherein, the first status value indicates that it is in a status of receiving unfinished message data.

上述报文处理装置130中,通过拥塞判断模块140、存储模块150、轮询模块160、识别模块170、编辑模块180和转发模块190的协同作用,在当前收包未处于拥塞状态时,直接将接收的业务报文的报文头数据写入中央处理器的高速缓存,从而中央处理器处理该业务报文时,报文头数据已经在高速缓存中,无需再去访问双倍速率同步动态随机存储器来获取报文头数据,能够有效减轻中央处理器对双倍速率同步动态随机存储器的访存压力,进而能够提升软转发的整体性能。In the above message processing device 130, through the synergistic effect of the congestion judging module 140, the storage module 150, the polling module 160, the identification module 170, the editing module 180 and the forwarding module 190, when the current received packet is not in a congested state, directly send the The message header data of the received service message is written into the cache of the central processor, so that when the central processor processes the service message, the message header data is already in the cache, and there is no need to access the double-rate synchronous dynamic random Using the memory to obtain the packet header data can effectively reduce the memory access pressure of the central processing unit on the double-rate synchronous dynamic random access memory, thereby improving the overall performance of soft forwarding.

关于报文处理装置130的具体限定可以参见上文中对于报文处理方法的限定,在此不再赘述。上述报文处理装置130中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于电子设备中的处理器中,也可以以软件形式存储于电子设备的存储器中,以便于处理器调用执行以上各个模块对应的操作。For specific limitations of the packet processing device 130, reference may be made to the foregoing limitations on the packet processing method, which will not be repeated here. Each module in the above-mentioned packet processing device 130 may be fully or partially implemented by software, hardware or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, and can also be stored in the memory of the electronic device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules.

在一种实施方式中,提供了一种电子设备200,该电子设备200可以是终端,其内部结构图可以如图10所示。该电子设备200包括通过系统总线连接的处理器、存储器、通信接口、显示屏和输入装置。其中,该电子设备200的处理器用于提供计算和控制能力。该电子设备200的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该电子设备200的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、运营商网络、近场通信(NFC)或其他技术实现。该计算机程序被处理器执行时实现如上述实施方式提供的报文处理方法。In one implementation manner, an electronic device 200 is provided. The electronic device 200 may be a terminal, and its internal structure may be as shown in FIG. 10 . The electronic device 200 includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Wherein, the processor of the electronic device 200 is used to provide calculation and control capabilities. The memory of the electronic device 200 includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface of the electronic device 200 is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, operator network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, the packet processing method provided in the foregoing implementation manner is implemented.

图10中示出的结构,仅仅是与本发明方案相关的部分结构的框图,并不构成对本发明方案所应用于其上的电子设备200的限定,具体的电子设备200可以包括比图10中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。The structure shown in FIG. 10 is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the electronic device 200 to which the solution of the present invention is applied. The specific electronic device 200 may include More or fewer components are shown, or certain components are combined, or have different component arrangements.

在一种实施方式中,本发明提供的报文处理装置130可以实现为一种计算机程序的形式,计算机程序可在如图10所示的电子设备200上运行。电子设备200的存储器中可存储组成该报文处理装置130的各个程序模块,比如,图9所示的拥塞判断模块140、存储模块150、轮询模块160、识别模块170、编辑模块180和转发模块190。各个程序模块构成的计算机程序使得处理器执行本说明书中描述的报文处理方法中的步骤。In an implementation manner, the message processing apparatus 130 provided by the present invention may be implemented in the form of a computer program, and the computer program may run on the electronic device 200 shown in FIG. 10 . The memory of the electronic device 200 can store the various program modules that make up the message processing device 130, such as the congestion judgment module 140, storage module 150, polling module 160, identification module 170, editing module 180 and forwarding module shown in FIG. Module 190. The computer program constituted by each program module causes the processor to execute the steps in the message processing method described in this specification.

例如,图10所示的电子设备200可以通过如图8所示的报文处理装置130中的拥塞判断模块140执行步骤S12。电子设备200可以通过存储模块150执行步骤S14和S16。电子设备200可以通过轮询模块160执行步骤S21。电子设备200可以通过识别模块170执行步骤S23。电子设备200可以通过编辑模块180执行步骤S25。电子设备200可以通过转发模块190执行步骤S27。For example, the electronic device 200 shown in FIG. 10 may execute step S12 through the congestion judging module 140 in the packet processing apparatus 130 shown in FIG. 8 . The electronic device 200 may perform steps S14 and S16 through the storage module 150 . The electronic device 200 may execute step S21 through the polling module 160 . The electronic device 200 may execute step S23 through the identification module 170 . The electronic device 200 may execute step S25 through the editing module 180 . The electronic device 200 may execute step S27 through the forwarding module 190 .

在一种实施方式中,提供了一种电子设备200,包括存储器和图形处理器,该存储器存储有机器可执行指令,该处理器执行机器可执行指令时实现以下步骤:监测到外部设备开始发送业务报文的数据包时,判断当前收包是否处于拥塞状态;若否,则接收数据包,从数据包中提取出业务报文的报文头数据,将报文头数据写入中央处理器的高速缓存,将除报文头数据之外的数据包写入双倍速率同步动态随机存储器;若是,则接收数据包将数据包写入双倍速率同步动态随机存储器。In one embodiment, an electronic device 200 is provided, including a memory and a graphics processor, the memory stores machine-executable instructions, and the processor implements the following steps when executing the machine-executable instructions: it is detected that the external device starts to send When receiving a data packet of a business message, it is judged whether the current receiving packet is in a congested state; if not, the data packet is received, the header data of the business message is extracted from the data packet, and the header data is written into the central processing unit cache, write the data packet except the header data into the double-rate synchronous DRAM; if so, receive the data packet and write the data packet into the double-rate synchronous DRAM.

在一种实施方式中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被图形处理器执行时实现如下步骤:检测到外部设备开始发送业务报文的数据包时,判断当前收包是否处于拥塞状态;若否,则接收数据包,从数据包中提取出业务报文的报文头数据,将报文头数据写入中央处理器的高速缓存,将除报文头数据之外的数据包写入双倍速率同步动态随机存储器;若是,则将数据包写入双倍速率同步动态随机存储器。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a graphics processor, the following steps are implemented: when it is detected that an external device starts to send a data packet of a service message, Determine whether the current receiving packet is in a congested state; if not, receive the data packet, extract the header data of the service message from the data packet, write the header data into the cache of the central processing unit, and delete the packet The data packet other than the header data is written into the double-rate synchronous dynamic random access memory; if so, the data packet is written into the double-rate synchronous dynamic random access memory.

在一种实施方式中,提供了一种电子设备200,包括存储器和图形处理器,该存储器存储有机器可执行指令,该处理器执行机器可执行指令时实现以下步骤:轮询DMA描述符,若当前轮询的DMA描述符为第二状态值,则从DMA描述符中获取数据地址,并确定DMA描述符所对应的业务报文;识别中央处理器的高速缓存中是否存在业务报文的报文头数据,若是,则对高速缓存中的报文头数据进行解析识别,并基于识别结果进行查表,确定出转发信息;从双倍速率同步动态随机存储器中数据地址对应的存储区域中获取业务报文的剩余数据,对剩余数据进行编辑,得到待转发报文;基于转发信息,将待转发报文转发至下一跳设备,将DMA描述符置为第一状态值,并释放DMA描述符中的数据地址。In one embodiment, an electronic device 200 is provided, including a memory and a graphics processor, the memory stores machine-executable instructions, and the processor implements the following steps when executing the machine-executable instructions: polling the DMA descriptor, If the DMA descriptor of current polling is the second state value, then obtain the data address from the DMA descriptor, and determine the corresponding business message of the DMA descriptor; identify whether there is a business message in the cache memory of the central processing unit Message header data, if yes, then analyze and identify the message header data in the cache, and look up the table based on the identification result to determine the forwarding information; from the storage area corresponding to the data address in the double rate synchronous dynamic random access memory Obtain the remaining data of the service message, edit the remaining data, and obtain the message to be forwarded; based on the forwarding information, forward the message to be forwarded to the next hop device, set the DMA descriptor to the first state value, and release the DMA The address of the data in the descriptor.

在一种实施方式中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被图形处理器执行时实现如下步骤:轮询DMA描述符,若当前轮询的DMA描述符为第二状态值,则从DMA描述符中获取数据地址,并确定DMA描述符所对应的业务报文;识别中央处理器的高速缓存中是否存在业务报文的报文头数据,若是,则对高速缓存中的报文头数据进行解析识别,并基于识别结果进行查表,确定出转发信息;从双倍速率同步动态随机存储器中数据地址对应的存储区域中获取业务报文的剩余数据,对剩余数据进行编辑,得到待转发报文;基于转发信息,将待转发报文转发至下一跳设备,将DMA描述符置为第一状态值,并释放DMA描述符中的数据地址。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a graphics processor, the following steps are implemented: polling DMA descriptors, if the currently polled DMA descriptor is the second state value, then obtain the data address from the DMA descriptor, and determine the corresponding service message of the DMA descriptor; identify whether the message header data of the service message exists in the cache memory of the central processing unit, if so, then Analyze and identify the message header data in the cache, and look up the table based on the identification result to determine the forwarding information; obtain the remaining data of the service message from the storage area corresponding to the data address in the double-rate synchronous dynamic random access memory, Edit the remaining data to obtain the message to be forwarded; based on the forwarding information, forward the message to be forwarded to the next hop device, set the DMA descriptor to the first state value, and release the data address in the DMA descriptor.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本发明的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may also be implemented in other ways. The device embodiments described above are only illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functions and possible implementations of devices, methods and computer program products according to multiple embodiments of the present invention. operate. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or part of code that includes one or more Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.

另外,在本发明各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。In addition, each functional module in each embodiment of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备110等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device 110, etc.) execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes. .

以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (10)

1. The message processing method is characterized by being applied to network equipment, wherein the network equipment comprises a central processing unit and a double-rate synchronous dynamic random access memory, and the method comprises the following steps:
when the data packet of the service message is monitored to be sent by the external equipment, judging whether the current received packet is in a congestion state or not;
if not, receiving the data packet, extracting the message header data of the service message from the data packet, writing the message header data into a cache of the central processing unit, and writing the data packet except the message header data into the double-rate synchronous dynamic random access memory;
if yes, the data packet is received, and the data packet is written into the double-rate synchronous dynamic random access memory.
2. The method of claim 1, wherein the step of receiving the data packet comprises:
adopting direct memory access, receiving a data packet of a service message sent by external equipment, and updating a state value of a DMA descriptor from a first state value to a second state value;
the first state value represents that the message data receiving state is not completed, and the second state value represents that the message data receiving state is completed;
Before the step of writing the data packet except the header data into the double rate synchronous dynamic random access memory, or before the step of writing the data packet into the double rate synchronous dynamic random access memory, the method further comprises:
and determining the data address of the storage area for storing the data packet in the double-rate synchronous dynamic random access memory.
3. The method for processing a packet according to claim 1 or 2, wherein the step of determining whether the currently received packet is in a congestion state comprises:
determining the total number of descriptors representing the completion state of receiving the message data from all DMA descriptors;
and judging whether the total number of the descriptors exceeds a preset threshold value, if so, judging that the current received packet is in a congestion state, and if not, judging that the current received packet is not in the congestion state.
4. The method according to claim 1 or 2, wherein the step of writing the header data into the cache of the central processing unit comprises:
transmitting the message header data and the data address to a bus; the data address is an address of a storage area storing the data packet in the double-rate synchronous dynamic random access memory;
And storing the header data into the allocated specific area in the cache of the central processing unit through the bus according to the data address.
5. The message processing method according to claim 4, wherein before the step of sending the header data and the data address to the bus, the method comprises:
and allocating a free specific area for the message header data from the cache of the central processing unit.
6. The method for processing a packet according to claim 1 or 2, wherein the step of extracting header data of the service packet from the data packet includes:
and extracting data with the length of a preset length from the data packet by taking the initial field of the data packet as a message header starting point.
7. A method for processing a message, the method being applied to a network device, the network device including a central processing unit and a double rate synchronous dynamic random access memory, the method comprising:
polling a DMA descriptor, if the currently polled DMA descriptor is a second state value, acquiring a data address from the DMA descriptor, and determining a service message corresponding to the DMA descriptor; wherein, the second state value representation is in a message data receiving completion state;
Identifying whether the message header data of the service message exists in a cache of the central processing unit, if so, analyzing and identifying the message header data in the cache, and looking up a table based on an identification result to determine forwarding information;
obtaining the residual data of the service message from a storage area corresponding to the data address in the double-rate synchronous dynamic random access memory, and editing the residual data to obtain a message to be forwarded;
and forwarding the message to be forwarded to next-hop equipment based on the forwarding information, setting the DMA descriptor as a first state value, and releasing a data address in the DMA descriptor.
8. The message processing device is characterized by being applied to network equipment, wherein the network equipment comprises a central processing unit and a double-rate synchronous dynamic random access memory, and the message processing device comprises a congestion judging module and a storage module;
the congestion judging module is used for judging whether the current received packet is in a congestion state or not when the data packet of the service message is monitored to be sent by the external equipment;
the storage module is used for receiving the data packet, extracting the message header data of the service message from the data packet, writing the message header data into the cache of the central processing unit, and writing the data packet except the message header data into the double-rate synchronous dynamic random access memory if not;
And the storage module is also used for receiving the data packet if yes, and writing the data packet into the double-rate synchronous dynamic random access memory.
9. An electronic device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor to implement the message processing method of any of claims 1 to 7.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the message processing method according to any of claims 1 to 7.
CN202310237832.4A 2023-03-13 2023-03-13 Message processing method, device, electronic device and computer-readable storage medium Active CN116208574B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310237832.4A CN116208574B (en) 2023-03-13 2023-03-13 Message processing method, device, electronic device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310237832.4A CN116208574B (en) 2023-03-13 2023-03-13 Message processing method, device, electronic device and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN116208574A true CN116208574A (en) 2023-06-02
CN116208574B CN116208574B (en) 2025-09-30

Family

ID=86511090

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310237832.4A Active CN116208574B (en) 2023-03-13 2023-03-13 Message processing method, device, electronic device and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN116208574B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117076346A (en) * 2023-07-24 2023-11-17 龙芯中科(成都)技术有限公司 Application program data processing method and device and electronic equipment
CN119544648A (en) * 2024-11-07 2025-02-28 中汽创智科技有限公司 A message communication processing method, device and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4755986A (en) * 1985-09-13 1988-07-05 Nec Corporation Packet switching system
US20080005405A1 (en) * 2006-06-05 2008-01-03 Freescale Semiconductor, Inc. Data communication flow control device and methods thereof
CN102497322A (en) * 2011-12-19 2012-06-13 曙光信息产业(北京)有限公司 High-speed packet filtering device and method realized based on shunting network card and multi-core CPU (Central Processing Unit)
CN107547417A (en) * 2016-06-29 2018-01-05 中兴通讯股份有限公司 A kind of message processing method, device and base station
CN113099490A (en) * 2021-03-09 2021-07-09 深圳震有科技股份有限公司 Data packet transmission method and system based on 5G communication
CN114816254A (en) * 2022-04-26 2022-07-29 苏州浪潮智能科技有限公司 Hard disk data access method, device, equipment and medium
CN115167771A (en) * 2022-07-06 2022-10-11 山东省计算中心(国家超级计算济南中心) InfiniBand network data caching processing system and method
CN115460024A (en) * 2022-09-02 2022-12-09 鹏城实验室 Network card driver optimization method, device, equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4755986A (en) * 1985-09-13 1988-07-05 Nec Corporation Packet switching system
US20080005405A1 (en) * 2006-06-05 2008-01-03 Freescale Semiconductor, Inc. Data communication flow control device and methods thereof
CN102497322A (en) * 2011-12-19 2012-06-13 曙光信息产业(北京)有限公司 High-speed packet filtering device and method realized based on shunting network card and multi-core CPU (Central Processing Unit)
CN107547417A (en) * 2016-06-29 2018-01-05 中兴通讯股份有限公司 A kind of message processing method, device and base station
CN113099490A (en) * 2021-03-09 2021-07-09 深圳震有科技股份有限公司 Data packet transmission method and system based on 5G communication
CN114816254A (en) * 2022-04-26 2022-07-29 苏州浪潮智能科技有限公司 Hard disk data access method, device, equipment and medium
CN115167771A (en) * 2022-07-06 2022-10-11 山东省计算中心(国家超级计算济南中心) InfiniBand network data caching processing system and method
CN115460024A (en) * 2022-09-02 2022-12-09 鹏城实验室 Network card driver optimization method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117076346A (en) * 2023-07-24 2023-11-17 龙芯中科(成都)技术有限公司 Application program data processing method and device and electronic equipment
CN119544648A (en) * 2024-11-07 2025-02-28 中汽创智科技有限公司 A message communication processing method, device and electronic equipment

Also Published As

Publication number Publication date
CN116208574B (en) 2025-09-30

Similar Documents

Publication Publication Date Title
CN105684382A (en) Packet control method, switch and controller
CN116208574A (en) Message processing method, device, electronic equipment and computer readable storage medium
WO2023125380A1 (en) Data management method and corresponding apparatus
CN103532784A (en) Method and system for transmitting heartbeat messages, terminal and network equipment
CN106201783B (en) A kind of data reconstruction method and device
US10797986B2 (en) Link discovery method and apparatus
CN112152940A (en) Message processing method, device and system
CN116032861B (en) A message processing method and device
CN103281257B (en) A kind of protocol message processing method and equipment
CN101043689B (en) Call analysis method and device
WO2022116953A1 (en) Packet processing method, device, system, and storage medium
CN114125078A (en) MAC address learning method and device
CN112003796B (en) Broadcast message processing method, system, equipment and computer storage medium
CN112612670A (en) Session information statistical method, device, exchange equipment and storage medium
CN111262782B (en) Message processing method, device and equipment
CN109614345B (en) Memory management method and device for communication between protocol layers
CN111552668B (en) High-performance cross-domain copying method based on zfs file system
CN109766347B (en) Data updating method, device, system, computer equipment and storage medium
CN117176834A (en) A message sending and receiving method, network card and computing device
CN114422617A (en) Message processing method, system and computer readable storage medium
CN113301123A (en) Data stream processing method, device and storage medium
CN110445721B (en) Message forwarding method and device
CN113347281B (en) Data transmission method, device, electronic device and storage medium
CN116133159A (en) GTP data packet processing method, device, computer equipment and storage medium
CN113825042B (en) Data access method, device, chip and computer 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