CN101136854B - Method and apparatus for implementing data packet linear speed processing - Google Patents
Method and apparatus for implementing data packet linear speed processing Download PDFInfo
- Publication number
- CN101136854B CN101136854B CN2007100851973A CN200710085197A CN101136854B CN 101136854 B CN101136854 B CN 101136854B CN 2007100851973 A CN2007100851973 A CN 2007100851973A CN 200710085197 A CN200710085197 A CN 200710085197A CN 101136854 B CN101136854 B CN 101136854B
- Authority
- CN
- China
- Prior art keywords
- data
- packet
- port
- flow
- input
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域technical field
本发明涉及以太网数据传输处理领域,具体地说,涉及一种实现以太网数据包线速处理的方法和装置。The invention relates to the field of Ethernet data transmission processing, in particular to a method and device for realizing line-speed processing of Ethernet data packets.
背景技术Background technique
在以太网数据传输处理领域中,需要对接收到的数据包进行包处理和缓存,倾向于采用先处理后缓存的策略。在数据包缓存之前,主要进行流分类以及许可控制处理。当从各个端口提取数据流数据包时,如果发现是包首数据,则拷贝一份通过控制总线送往流分类单元进行相应的处理,提取包首过程严格按照先后次续,这样可以保证最先返回流ID结果的必然是第一个提取的包首。流分类单元接收数据包的包首字节数据后,首先进行帧头分析,然后进行MAC地址学习查找,基于端口ID进行标签提取,最后根据流标签进行流二叉树查找,获得数据包的流ID。In the field of Ethernet data transmission and processing, it is necessary to process and buffer the received data packets, and the strategy of processing first and then buffering tends to be adopted. Before data packet buffering, flow classification and admission control processing are mainly performed. When extracting data stream data packets from each port, if it is found to be packet header data, a copy will be sent to the flow classification unit through the control bus for corresponding processing. The stream ID result returned must be the first extracted packet header. After the flow classification unit receives the first byte data of the data packet, it first analyzes the frame header, then performs MAC address learning and search, performs label extraction based on the port ID, and finally performs flow binary tree search according to the flow label to obtain the flow ID of the data packet.
在收到数据流数据包尾时,需根据当前数据流的包信息(包长、数据流ID)进行许可控制操作以实现作流量监管。在做许可控制时,必须知道数据流的流ID,才能做出相应的决策处理诸如速率限制、随机早期丢弃等。因此,在输入控制单元收到包首且为包尾数据流时,在流分类获得相应的数据包流分类信息后方可进行许可控制。当数据包需要分次传输时,则在数据包结束时将根据数据流的相关信息即前面提及的数据流ID以及包长信息做许可控制。When receiving the end of the data stream data packet, it is necessary to perform an admission control operation according to the packet information (packet length, data stream ID) of the current data stream to realize traffic supervision. When doing admission control, the flow ID of the data flow must be known to make corresponding decisions such as rate limiting, random early discarding, and so on. Therefore, when the input control unit receives the packet header and it is a packet tail data flow, the admission control can only be performed after the flow classification obtains the corresponding data packet flow classification information. When the data packet needs to be transmitted in batches, at the end of the data packet, the admission control will be performed according to the relevant information of the data flow, that is, the aforementioned data flow ID and packet length information.
因此,在对数据包采用先处理后缓存策略时,存储数据包前需要对数据包进行流分类查找以及根据流的许可控制以实现作流量监管。而且,对同一个数据包而言,是以串行的方式进行这两步的处理,流分类处理得到数据包所对应的流ID,而许可控制则是基于流的许可控制,数据包处理的时间将取决于流分类和许可控制的时间。尤其是在多端口、高带宽线速数据流输入时,虽然可以针对不同的端口输入启用独自的处理流程可以有效解决线速处理数据包,但这是以牺牲逻辑规模和功耗为前提的。因此,在线速输入数据流带宽比较大的情况下,兼顾设计的逻辑规模和功耗,实现数据包的线速处理便成了一个需要解决的重要性能问题。Therefore, when the data packet is processed first and then cached, it is necessary to search for the flow classification of the data packet before storing the data packet, and to implement traffic supervision according to the admission control of the flow. Moreover, for the same data packet, the two-step processing is performed in a serial manner. The flow classification processing obtains the flow ID corresponding to the data packet, and the admission control is based on the flow. The timing will depend on the timing of traffic classification and admission control. Especially in the case of multi-port, high-bandwidth wire-speed data stream input, although independent processing flows can be enabled for different port inputs to effectively solve the wire-speed processing of data packets, but this is based on sacrificing logic scale and power consumption. Therefore, when the bandwidth of the line-speed input data stream is relatively large, it is an important performance problem to be solved to realize the line-speed processing of data packets while taking into account the design logic scale and power consumption.
发明内容Contents of the invention
本发明所要解决的技术问题在于提供一种实现数据包线速处理的方法和装置,以解决在处理多端口、高带宽线速数据流输入数据包时,性能对制约整个数据包线速处理流程的瓶颈问题,同时也兼顾了逻辑规模和功耗问题。The technical problem to be solved by the present invention is to provide a method and device for realizing data packet line-speed processing, so as to solve the problem that performance restricts the entire data packet line-speed processing flow when processing multi-port, high-bandwidth line-speed data flow input data packets The bottleneck problem, but also take into account the logic scale and power consumption.
为了解决上述问题,本发明提供了一种实现数据包线速处理的装置,应用于处理多端口、高带宽线速数据流输入数据包,其特征在于,包括:In order to solve the above-mentioned problem, the present invention provides a kind of device that realizes data packet wire-speed processing, is applied to processing multi-port, high-bandwidth wire-speed data flow input data packet, is characterized in that, comprises:
输入端口调度单元,用于根据一定的调度策略调度当前多端口数据流输入请求中的端口获得响应权;The input port scheduling unit is used to schedule the ports in the current multi-port data flow input request to obtain the response right according to a certain scheduling policy;
输入端口数据缓存单元,用于对获得响应权的端口的数据流输入数据包的包首数据部分缓存在包首的先进先出缓存单元中;对获得响应权的不同端口的数据流输入数据包的非包首数据部分缓存在各自相应的非包首的先进先出缓存单元中;The input port data cache unit is used to cache the packet header data part of the data flow input data packet of the port that obtains the response right in the first-in-first-out buffer unit of the packet header; input data packets for the data flow of different ports that obtain the response right The non-packet header data part is cached in the corresponding non-packet header first-in-first-out cache unit;
流分类单元,用于对数据包的包首数据进行帧头分析,然后进行MAC地址查找,并基于对应端口ID进行标签提取,根据该标签获得该数据包的流ID;The flow classification unit is used to analyze the header data of the data packet, then perform MAC address search, and extract the label based on the corresponding port ID, and obtain the flow ID of the data packet according to the label;
包首数据修改单元,用于根据所述流分类单元的结果,对该数据包进行VLAN标签的修改;A packet header data modifying unit, configured to modify the VLAN tag of the data packet according to the result of the flow classification unit;
输入端口数据缓存调度单元,用于调度所述输入端口数据缓存单元中存储的端口数据流输入数据包的非包首数据;The input port data cache scheduling unit is used to schedule non-packet header data of the port data stream input data packets stored in the input port data cache unit;
许可控制单元,用于对端口数据流输入数据包的非包首数据占用缓存空间的情况对数据包进行随机早期丢弃,对数据包进行流量监管处理,同时对数据流输入的速率进行限制;The admission control unit is used for random early discarding of the data packets when the non-packet head data of the port data flow input data packets occupies the buffer space, performs flow supervision processing on the data packets, and simultaneously limits the input rate of the data flow;
切片控制单元,用于接收所述包首数据修改单元、许可控制单元和输入端口数据缓存调度单元的结果,重新拼装各端口的数据流输入数据包中的数据;The slice control unit is used to receive the results of the packet header data modification unit, the admission control unit and the input port data buffer scheduling unit, and reassemble the data in the data stream input data packet of each port;
数据流数据存储器,用于存储所述切片控制单元输出的结果。The data stream data storage is used to store the result output by the slice control unit.
本发明所述的装置,其中,所述许可控制单元,进一步包括:应用的算法有随机早期丢弃算法和/或双漏桶限速算法。In the device according to the present invention, the admission control unit further includes: the applied algorithm includes a random early discard algorithm and/or a double leaky bucket rate limiting algorithm.
本发明所述的装置,其中,所述输入端口调度单元中的调度策略,为带有优先级或权重的调度仲裁策略或为不带优先级和权重的简单轮循调度仲裁策略;The device according to the present invention, wherein, the scheduling strategy in the input port scheduling unit is a scheduling arbitration strategy with priority or weight or a simple round-robin scheduling arbitration strategy without priority and weight;
其中,所述输入端口调度单元,进一步包括:Wherein, the input port scheduling unit further includes:
基于数据包执行处理类型以及输入数据流数据端口的类型选择调度策略。A scheduling policy is selected based on the packet execution processing type and the type of the input data flow data port.
本发明所述的装置,其中,进一步包括:The device of the present invention, further comprising:
切片数据缓存单元,用于根据先进先出缓存所述切片控制单元输出的数据。A slice data cache unit, configured to cache the data output by the slice control unit according to first-in first-out.
本发明所述的装置,其中,所述包首数据修改单元中的VLAN标签的修改,包括:添加、删除或替换。In the device of the present invention, wherein the modification of the VLAN tag in the packet header data modification unit includes: adding, deleting or replacing.
本发明所述的装置,其中,所述流分类单元中的获得该数据包的流ID,为根据流二叉树查找获得该数据包的流ID。In the device according to the present invention, obtaining the flow ID of the data packet in the flow classification unit is to obtain the flow ID of the data packet according to a flow binary tree search.
为了解决上述问题,本发明还提供了一种实现数据包线速处理的方法,应用于处理多端口、高带宽线速数据流输入数据包,其特征在于,包括以下步骤:In order to solve the above problems, the present invention also provides a method for realizing data packet wire-speed processing, which is applied to processing multi-port, high-bandwidth wire-speed data flow input data packets, and is characterized in that, comprising the following steps:
(1)根据一定的调度策略调度当前多端口数据流输入请求中的端口获得响应权,对获得响应权的端口的数据流输入数据包的包首数据部分缓存在包首的先进先出缓存单元中;对获得响应权的不同端口的数据流输入数据包的非包首数据部分缓存在各自相应的非包首的先进先出缓存单元中;(1) According to a certain scheduling policy, the ports in the current multi-port data flow input request are scheduled to obtain the right to respond, and the packet header data part of the data flow input data packet of the port that obtains the response right is cached in the first-in-first-out buffer unit at the beginning of the packet Middle; the non-packet header data part of the data flow input data packets of different ports that have obtained the right to respond is cached in the respective corresponding non-packet header first-in-first-out buffer units;
(2)对数据包的包首数据进行帧头分析,然后进行MAC地址查找,并基于对应端口ID进行标签提取,根据该标签获得该数据包的流ID,同时对该数据包进行VLAN标签的修改;(2) Carry out frame header analysis to the packet header data of data packet, then carry out MAC address search, and carry out label extraction based on corresponding port ID, obtain the stream ID of this data packet according to this label, carry out VLAN tagging to this data packet simultaneously Revise;
(3)对端口数据流输入数据包的非包首数据占用缓存空间的情况对数据包进行随机早期丢弃,对数据包进行流量监管处理,同时对数据流输入的速率进行限制;(3) When the non-packet head data of the port data flow input data packet occupies the buffer space, the data packet is randomly discarded early, the data packet is flow supervised, and the rate of data flow input is limited;
(4)根据步骤(2)和(3)的结果重新拼装各端口的数据流输入数据包中的数据后,传送到数据流数据存储器中存储。(4) According to the results of steps (2) and (3), reassemble the data in the data stream input data packet of each port, and then transmit it to the data stream data storage for storage.
本发明所述的方法,其中,所述步骤(3)进一步包括:The method of the present invention, wherein, the step (3) further comprises:
应用的算法有随机早期丢弃算法和/或双漏桶限速算法。The applied algorithms are random early drop algorithm and/or double leaky bucket rate limiting algorithm.
本发明所述的方法,其中,步骤(1)中所述调度策略,为带有优先级或权重的调度仲裁策略或为不带优先级和权重的简单轮循调度仲裁策略;In the method of the present invention, wherein the scheduling strategy in step (1) is a scheduling arbitration strategy with priority or weight or a simple round-robin scheduling arbitration strategy without priority and weight;
其中,所述步骤(1)中进一步包括:基于数据包执行处理类型以及输入数据流数据端口的类型选择调度策略。Wherein, the step (1) further includes: selecting a scheduling strategy based on the execution processing type of the data packet and the type of the data port of the input data stream.
本发明所述的方法,其中,所述步骤(4)包括:The method of the present invention, wherein, said step (4) comprises:
根据步骤(2)和(3)的结果重新拼装各端口的数据流输入数据包中的数据后,对重新拼装的数据包的数据执行先进先出的缓存处理,传送到数据流数据存储器中存储。According to the result of steps (2) and (3), after reassembling the data in the data stream input data packet of each port, the data of the reassembled data packet is carried out first-in-first-out cache processing, and is transmitted to the data stream data memory for storage .
本发明所述的方法,其中,步骤(2)中所述VLAN标签的修改,包括:添加、删除或替换。In the method of the present invention, the modification of the VLAN tag in step (2) includes: adding, deleting or replacing.
本发明所述的方法,其中,步骤(2)中所述获得该数据包的流ID,为根据流二叉树查找获得该数据包的流ID。In the method of the present invention, obtaining the flow ID of the data packet in step (2) is to obtain the flow ID of the data packet according to the flow binary tree search.
本发明所述的内容在兼顾考虑逻辑规模和功耗的同时,提高处理线速数据包输入时的性能,满足数据包实现线速处理的性能要求。The content of the present invention improves the performance of processing line-speed data packet input while taking into account the logic scale and power consumption, and meets the performance requirements of line-speed processing of data packets.
本发明展示的是一种实现以太网数据包线速处理的方法和装置,在处理多端口数据流高带宽线速输入时,既最大限度地降低了电路的规模和功耗,又提升处理线速数据包的性能,达到了实现数据包线速处理的实时要求。The present invention shows a method and device for realizing line-speed processing of Ethernet data packets. When processing multi-port data flow and high-bandwidth line-speed input, it not only reduces the scale and power consumption of the circuit to the greatest extent, but also improves the processing line speed. The performance of the high-speed data packet has reached the real-time requirement of realizing the line-speed processing of the data packet.
附图说明Description of drawings
图1是本发明实施例所述一种实现数据包线速处理的装置的原理结构图;FIG. 1 is a schematic structural diagram of a device for realizing line-speed processing of data packets according to an embodiment of the present invention;
图2是本发明实施例所述的一种实现数据包线速处理的方法的流程图。Fig. 2 is a flow chart of a method for realizing line-speed processing of data packets according to an embodiment of the present invention.
具体实施方式Detailed ways
本发明为了解决传统技术方案存在的弊端,通过以下具体实施例进一步阐述本发明所述的一种实现数据包线速处理的方法和装置,以下对具体实施方式进行详细描述,但不作为对本发明的限定。In order to solve the disadvantages of the traditional technical solutions, the present invention further elaborates a method and device for realizing data packet line-speed processing according to the present invention through the following specific examples. limit.
如图1所示,为本发明一种实现数据包线速处理的装置的实施例,具体内容如下:As shown in Figure 1, it is an embodiment of a device for realizing data packet line-speed processing in the present invention, and the specific content is as follows:
本发明实施例所述装置包括:输入端口调度单元101,输入端口数据缓存单元102,输入端口数据缓存调度单元103,流分类单元104,许可控制单元105,包首数据修改单元106,切片控制单元107,切片数据缓存单元108,数据流数据存储器109。The device described in the embodiment of the present invention includes: an input port scheduling unit 101, an input port data cache unit 102, an input port data cache scheduling unit 103, a flow classification unit 104, a permission control unit 105, a packet header data modification unit 106, and a slice control unit 107 , a slice data cache unit 108 , and a data stream data storage 109 .
来自于4个GE输入端口的数据包请求,首先经过输入端口调度单元101调度,以选择端口输入请求中的某一GE口的包数据,被调度的数据包数据方可执行后续的操作;调度选中的数据包,缓存在输入端口数据缓存调度单元102;然后数据包的包首数据,经过流分类单元104,以决定该数据流执行何种包首修改操作以及VLAN标签的转换;在数据包的包尾时将数据包的长度、流ID信息送往许可控制单元105,该许可控制单元1 05根据输入流占用缓存空间的情况对数据包进行随机早期丢弃,对数据包进行流量监管处理,同时对输入流的速率进行限制。在包首数据修改单元106,将根据流分类单元的执行结果,以决定该数据包执行何种包首修改操作以及VLAN标签的转换,经过包首修改后的数据将向切片控制单元107发送切片请求;同时,输入端口数据缓存调度单元103调度存放在各端口对应的非包首数据缓存FIFO里的数据,被调度的数据将向切片控制单元107发送切片请求;切片控制单元107仲裁包首数据和非包首数据的切片请求,并将切片完成的数据送往数据流数据存储器中存储;受数据存储速率的制约,在切片完成后的数据来不及送往数据存储器中存储时,切片数据将由切片数据缓存单元108缓存;这里,切片数据缓存单元108由两个相同的FIFO组成,以执行乒乓操作。The data packet requests from the 4 GE input ports are first scheduled by the input port scheduling unit 101 to select the packet data of a certain GE port in the port input request, and the scheduled data packet data can perform subsequent operations; scheduling The selected data packet is cached in the input port data cache scheduling unit 102; then the packet header data of the data packet passes through the flow classification unit 104 to determine which packet header modification operation and VLAN tag conversion are carried out by the data flow; At the end of the packet, the length of the data packet and the flow ID information are sent to the admission control unit 105, and the admission control unit 105 randomly discards the data packet early according to the situation of the buffer space occupied by the input flow, and performs flow supervision processing on the data packet. At the same time, the rate of the input stream is limited. In the packet header data modification unit 106, according to the execution result of the flow classification unit, to determine which packet header modification operation and VLAN label conversion to perform for the data packet, the data after the packet header modification will be sent to the slice control unit 107 as a slice request; at the same time, the input port data cache scheduling unit 103 schedules the data stored in the non-packet header data cache FIFO corresponding to each port, and the scheduled data will send a slice request to the slice control unit 107; the slice control unit 107 arbitrates the packet header data and non-packet header data slice requests, and send the sliced data to the data stream data memory for storage; due to the restriction of the data storage rate, when the sliced data is too late to be sent to the data memory for storage, the sliced data will be stored by the slice The data cache unit 108 caches; here, the slice data cache unit 108 is composed of two identical FIFOs to perform a ping-pong operation.
其中,所述输入端口调度单元101,用于调度当前多端口输入请求中的某一端口获得响应权,获得响应权端口的数据流数据包执行相应的处理。当端口请求数量大于或等于2时,需要按照一定的调度策略对发出调度申请的所有端口进行仲裁,以选择为其中的某一端口的数据流服务。这里所指的调度策略主要分为两种,一种是带有优先级或权重的调度仲裁,另一种则是不带优先级和权重的简单轮循调度,调度策略的选择基于数据包执行处理类型以及输入数据流数据端口的类型。Wherein, the input port scheduling unit 101 is configured to schedule a certain port in the current multi-port input request to obtain the right to respond, and perform corresponding processing on the data stream data packets of the ports that have obtained the right to respond. When the number of port requests is greater than or equal to 2, it is necessary to arbitrate all the ports that send out the scheduling requests according to a certain scheduling strategy, so as to choose to serve the data flow of one of the ports. The scheduling strategy referred to here is mainly divided into two types, one is scheduling arbitration with priority or weight, and the other is simple round-robin scheduling without priority and weight. The selection of scheduling strategy is based on packet execution The processing type and the type of the input data stream data port.
所述输入端口数据缓存单元102,用来缓存端口请求后获得响应权的端口数据。这里,输入端口数据缓存单元采用FIFO来实现,基于先进先出的顺序缓存端口数据以保证数据流不被修改。为了便于实现,缓存FIFO规格的设计,能按照数据总线的位宽存储一次突发操作的最大数据量。与此同时,按照缓存数据是否包首的不同,FIFO又分为两类,一是缓存包首数据部分的公共FIFO,获得响应权的端口包首数据都将缓存在包首FIFO中;另一则是缓存非包首数据的FIFO,不同的端口有相应独立的非包首数据缓存FIFO,不同端口的非包首数据将缓存在各自相应的非包首数据缓存FIFO中。The input port data cache unit 102 is used to cache the port data that obtains the response right after the port request. Here, the input port data cache unit is implemented by FIFO, and the port data is cached based on a first-in-first-out sequence to ensure that the data stream is not modified. For the convenience of implementation, the buffer FIFO specification is designed to store the maximum amount of data for a burst operation according to the bit width of the data bus. At the same time, FIFOs are divided into two types according to whether the cached data is header or not. One is the public FIFO that caches the header data of the packet. It is the FIFO for buffering non-packet header data. Different ports have corresponding independent non-packet header data buffer FIFOs. The non-packet header data of different ports will be cached in their corresponding non-packet header data buffer FIFOs.
所述流分类单元104,其功能是在收到数据包的包首字节后,首先进行帧头分析,然后进行MAC地址学习查找,基于端口ID进行标签提取,最后根据流标签进行流二叉树查找,获得数据包的流ID。Described flow classification unit 104, its function is after receiving the first byte of packet of data packet, firstly carry out frame header analysis, then carry out MAC address learning search, carry out label extraction based on port ID, carry out flow binary tree search according to flow label at last , to get the flow ID of the packet.
所述许可控制单元105,基于数据流以执行相应的许可控制功能;许可控制单元根据输入流占用缓存空间的情况对数据包进行随机早期丢弃,对数据包进行流量监管处理,同时对输入流的速率进行限制。许可控制单元主要应用的算法有随机早期丢弃算法和双漏桶限速算法。The admission control unit 105 performs corresponding admission control functions based on the data flow; the admission control unit performs random early discarding of the data packets according to the buffer space occupied by the input stream, performs traffic supervision processing on the data packets, and at the same time rate limiting. The main algorithms used by the admission control unit are the random early discard algorithm and the double leaky bucket speed limit algorithm.
所述包首数据修改单元106,其功能即是根据流分类单元104的结果对包首数据进行修改的单元,对数据包的修改主要进行VLAN标签的修改,包括添加、删除或者替换;针对包首数据进行何种操作,取决于对包首数据进行流分类的结果。流分类得到数据包的包首数据后,首先进行帧头分析,然后进行MAC地址学习查找,基于端口ID进行标签提取,最后根据流标签进行流二叉树查找,获得数据包的流ID;修改后的包首数据,向切片控制单元107发出切片请求,完成切片操作后的数据缓存在切片数据缓存单元108的FIFO中。Described packet header data modifying unit 106, its function is the unit that according to the result of flow classification unit 104, packet header data is modified, the modification of data packet mainly carries out the modification of VLAN label, comprises adding, deleting or replacing; What operation is performed on the header data depends on the result of flow classification on the packet header data. After flow classification obtains the packet header data of the data packet, it first analyzes the frame header, then performs MAC address learning and search, performs label extraction based on the port ID, and finally performs flow binary tree search according to the flow label to obtain the flow ID of the data packet; the modified The packet header data sends a slice request to the slice control unit 107 , and the data after the slice operation is completed is cached in the FIFO of the slice data cache unit 108 .
所述输入端口数据缓存调度单元103,用来调度存储非包首数据的非包首数据缓存FIFO中的某一FIFO向切片控制单元发出数据切片请求。在这里,切片即是该数据流数据的一次重新拼装过程。前已述及,对数据流的数据包需要进行VLAN标签的修改,包括添加、删除或者替换;而这部分操作在包首数据修改单元针对包首数据进行处理,完成相应操作后向切片控制单元发出切片请求。对于数据包的非包首数据,需要参考该数据包的包首修改操作,进行数据的重新拼装,以保证整个数据流数据包的有效数据字节不但不丢失,而且仍然保持相互之间的位置关系而不导致数据包的错乱。The input port data cache scheduling unit 103 is configured to schedule a certain FIFO in the non-packet header data cache FIFOs storing non-packet header data to send a data slice request to the slice control unit. Here, slicing is a reassembly process of the data stream data. As mentioned above, the data packets of the data stream need to be modified with VLAN tags, including adding, deleting or replacing; and this part of the operation is processed in the packet header data modification unit for the packet header data, and after the corresponding operations are completed, the slice control unit Make a slice request. For the non-packet header data of the data packet, it is necessary to refer to the packet header modification operation of the data packet to reassemble the data, so as to ensure that the valid data bytes of the entire data stream data packet are not lost, but also maintain their positions with each other relationship without causing packet confusion.
所述切片控制单元107,即是完成数据流数据包的重新拼装过程。数据流的数据包分为包首数据和非包首数据,对包首数据需要在流分类结果的基础上进行VLAN的修改,包括添加、删除或者替换。特别是标签的添加或是删除,将会影响到数据包的非包首数据在新数据包中的位置,因此,需要对标签修改后的数据进行重新拼装。基于前面所述的结构,切片控制单元的数据有两个来源:一是数据包首数据经过包首修改单元修改后可以进行切片操作的数据,另一则是对应于各端口的缓存在非包首数据FIFO中的非包首数据。The slice control unit 107 completes the reassembly process of the data stream data packets. The data packets of the data flow are divided into packet header data and non-packet header data. The packet header data needs to be modified on the basis of the flow classification result, including adding, deleting or replacing. In particular, the addition or deletion of labels will affect the position of the non-header data of the data packet in the new data packet. Therefore, it is necessary to reassemble the modified data of the label. Based on the above-mentioned structure, the data of the slice control unit has two sources: one is the data that can be sliced after being modified by the packet header modification unit; Non-packet header data in the header data FIFO.
所述切片数据缓存单元108,用来缓存切片控制单元的输出数据,也即各端口的数据流数据包在完成切片、数据拼装后,缓存新的数据包数据的FIFO;各端口的数据包在完成了一系列诸如VLAN标签替换、添加或删除以及由此引起的数据包重新拼装后,数据将送往数据包存储器中进行存储。在切片完成后的数据尚未来得及存储在数据流数据存储器109中时,切片数据将被临时缓存在该FIFO中。在这里,为了提高数据包处理的效率,我们采用了两片相同的切片数据缓存单元108进行乒乓操作,以达到实现数据包线速处理的目的。The slice data cache unit 108 is used to cache the output data of the slice control unit, that is, after the data stream data packets of each port are sliced and assembled, the FIFO of new data packet data is cached; the data packets of each port are stored in the After completing a series of tasks such as VLAN tag replacement, addition or deletion and the resulting reassembly of data packets, the data will be sent to the data packet memory for storage. Before the sliced data has time to be stored in the data stream data memory 109, the sliced data will be temporarily buffered in the FIFO. Here, in order to improve the efficiency of data packet processing, we use two slices of the same slice data cache unit 108 to perform ping-pong operation, so as to achieve the purpose of processing data packets at a line speed.
如图2所示,为本发明实施例所述的一种实现数据包线速处理的方法的流程图。结合附图1,其流程描述如下:As shown in FIG. 2 , it is a flow chart of a method for realizing line-speed processing of data packets according to an embodiment of the present invention. In conjunction with accompanying drawing 1, its process description is as follows:
步骤201、对输入端口GE0~GE3的数据按照简单轮循调度策略进行调度;进入步骤202;
步骤202、调度成功后,检查数据包数据是否有误,如果有误,则直接丢弃;反之,进入203;
步骤203、判断该数据包是否为包首,如果是包首数据,进入步骤204,如果是非包首数据,进入步骤205;
步骤204、该数据缓存在包首数据缓存FIFO 4中;进入步骤206;
步骤205、分属GE0~GE3口的数据包分别缓存在对应非包首数据缓存FIFO0~FIFO3中;进入步骤211;Step 205, the data packets belonging to GE0-GE3 ports are respectively buffered in the corresponding non-packet header data buffers FIFO0-FIFO3; enter
步骤206、包首数据送流分类单元进行相应处理,查看流分类查找是否通过;流分类查找失败,数据包丢弃;反之,流分类查找成功,进入步骤207;
步骤207、判断数据是否是数据包尾;如果是包尾,进入步骤208,反之进入步骤209;
步骤208、数据包尾,执行许可控制,不通过则丢弃;反之,进入步骤209;
步骤209、执行包头修改,修改后的包头数据向切片控制单元发切片请求;进入步骤210;
步骤210、切片完成数据缓存在切片FIFO中,并将缓存数据送存储器;
步骤211、存放非包首数据的数据缓存FIFO0~FIFO3调度,调度成功后,判断是否包尾,包尾则进入步骤212,否则进入步骤213;
步骤212、执行许可控制,不通过则丢弃;通过则进入步骤213;
步骤213、向切片控制单元发送切片请求;进入步骤210。
当然,本发明还可有其他多种实施例,在不背离本发明精神及其实质的情况下,熟悉本领域的技术人员可根据本发明做出各种相应的改变和变形,但这些相应的改变和变形都应属于本发明所附的权利要求的保护范围。Certainly, the present invention can also have other various embodiments, without departing from the spirit and essence of the present invention, those skilled in the art can make various corresponding changes and deformations according to the present invention, but these corresponding Changes and deformations should belong to the scope of protection of the appended claims of the present invention.
Claims (14)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2007100851973A CN101136854B (en) | 2007-03-19 | 2007-03-19 | Method and apparatus for implementing data packet linear speed processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2007100851973A CN101136854B (en) | 2007-03-19 | 2007-03-19 | Method and apparatus for implementing data packet linear speed processing |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101136854A CN101136854A (en) | 2008-03-05 |
CN101136854B true CN101136854B (en) | 2010-08-18 |
Family
ID=39160697
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2007100851973A Active CN101136854B (en) | 2007-03-19 | 2007-03-19 | Method and apparatus for implementing data packet linear speed processing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101136854B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102065011A (en) * | 2010-12-17 | 2011-05-18 | 天津曙光计算机产业有限公司 | Method for converging data streams of multi-port network card |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101414973B (en) * | 2008-11-25 | 2011-08-17 | 中国人民解放军信息工程大学 | Method and apparatus for transmitting data packet |
CN102714618B (en) * | 2009-06-22 | 2015-05-13 | 思杰系统有限公司 | Systems and methods for platform rate limiting |
CN102447608B (en) * | 2010-10-08 | 2014-11-05 | 中兴通讯股份有限公司 | Method, device and system for realizing packet reorganization by adopting accelerating technology |
CN102104548B (en) * | 2011-03-02 | 2015-06-10 | 中兴通讯股份有限公司 | Method and device for receiving and processing data packets |
CN102347772B (en) * | 2011-05-20 | 2014-07-30 | 新邮通信设备有限公司 | Compression processing method and equipment for base station files |
CN102684971A (en) * | 2012-05-28 | 2012-09-19 | 太仓市同维电子有限公司 | VLAN (Virtual Local Area Network) function realizing method and Linux system LAN gateway |
CN104852866B (en) * | 2014-02-17 | 2019-04-30 | 深圳市中兴微电子技术有限公司 | An output arbitration control method and device |
CN106327559B (en) * | 2016-08-22 | 2019-03-19 | 苏州伟卓奥科三维科技有限公司 | Communication means, data processing method and computing system |
CN108012338A (en) * | 2016-11-02 | 2018-05-08 | 中兴通讯股份有限公司 | Data transmission method, device, application and base station |
CN108933722B (en) * | 2017-05-26 | 2021-08-06 | 中兴通讯股份有限公司 | Vlan frame processing method, device and server |
TWI669015B (en) | 2017-11-24 | 2019-08-11 | 和碩聯合科技股份有限公司 | Method for scheduling tasks of a wireless sensor network |
CN108809854B (en) * | 2017-12-27 | 2021-09-21 | 北京时代民芯科技有限公司 | Reconfigurable chip architecture for large-flow network processing |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1428978A (en) * | 2001-12-28 | 2003-07-09 | 深圳市中兴通讯股份有限公司上海第二研究所 | Method for implementing multiplex line speed ATM interface in multi-layer network exchange |
CN1561052A (en) * | 2004-02-26 | 2005-01-05 | 中兴通讯股份有限公司 | User data message transporting method and device |
CN1677952A (en) * | 2004-03-30 | 2005-10-05 | 武汉烽火网络有限责任公司 | Method and apparatus for wire speed parallel forwarding of packets |
-
2007
- 2007-03-19 CN CN2007100851973A patent/CN101136854B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1428978A (en) * | 2001-12-28 | 2003-07-09 | 深圳市中兴通讯股份有限公司上海第二研究所 | Method for implementing multiplex line speed ATM interface in multi-layer network exchange |
CN1561052A (en) * | 2004-02-26 | 2005-01-05 | 中兴通讯股份有限公司 | User data message transporting method and device |
CN1677952A (en) * | 2004-03-30 | 2005-10-05 | 武汉烽火网络有限责任公司 | Method and apparatus for wire speed parallel forwarding of packets |
Non-Patent Citations (2)
Title |
---|
冯东雷,张勇,白英彩.线速数据包输入处理技术.计算机研究与发展39 1.2002,39(1),全文. * |
高玉邦."分组交换网络多媒体传输服务质量的研究".中国科学院计算技术研究所博士学位论文.2006,99. * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102065011A (en) * | 2010-12-17 | 2011-05-18 | 天津曙光计算机产业有限公司 | Method for converging data streams of multi-port network card |
Also Published As
Publication number | Publication date |
---|---|
CN101136854A (en) | 2008-03-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101136854B (en) | Method and apparatus for implementing data packet linear speed processing | |
CN111786900B (en) | Time queue-based temporal sensing flow shaper | |
CN116671081B (en) | Delay-based automatic queue management and tail drop | |
KR100690418B1 (en) | Multicast transmission method of a network processor, a computer-readable recording medium recording a program for performing the method, and a network processor supporting multicast transmission | |
US9864633B2 (en) | Network processor having multicasting protocol | |
US8370545B2 (en) | Programmable queuing instruction set | |
US7809009B2 (en) | Pipelined packet switching and queuing architecture | |
CN108833299B (en) | Large-scale network data processing method based on reconfigurable switching chip architecture | |
US12101260B1 (en) | Multi-destination traffic handling optimizations in a network device | |
US11258726B2 (en) | Low latency packet switch architecture | |
CN103914341B (en) | Data queue goes out group management-control method and device | |
CN106059957B (en) | Quickly flow stream searching method and system under a kind of high concurrent network environment | |
US8514855B1 (en) | Extensible packet processing architecture | |
CN102204183A (en) | Message order-preserving processing method, order-preserving coprocessor and network equipment | |
CN102971997B (en) | Packet buffer including data segment and data description segment | |
HUP0203823A2 (en) | Method and system for frame and protocol classification | |
US9485326B1 (en) | Scalable multi-client scheduling | |
CN106130930A (en) | A kind of Frame in advance join the team process device and method | |
US8990422B1 (en) | TCP segmentation offload (TSO) using a hybrid approach of manipulating memory pointers and actual packet data | |
US10868769B1 (en) | Read instruction queues in a network device | |
WO2016188032A1 (en) | Data forwarding method and system using flow table | |
CN107483405B (en) | A scheduling method and scheduling system supporting variable-length cells | |
US9083563B2 (en) | Method for reducing processing latency in a multi-thread packet processor with at least one re-order queue | |
CN110098977B (en) | Network data packet in-sequence storage method, computer device and storage medium | |
CN108182156A (en) | A kind of TCAM multichannel virtuals realization method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
EE01 | Entry into force of recordation of patent licensing contract |
Assignee: SANECHIPS TECHNOLOGY Co.,Ltd. Assignor: ZTE Corp. Contract record no.: 2011440020283 Denomination of invention: Method and apparatus for implementing data packet linear speed processing Granted publication date: 20100818 License type: Exclusive License Open date: 20080305 Record date: 20110726 |
|
C41 | Transfer of patent application or patent right or utility model | ||
TR01 | Transfer of patent right |
Effective date of registration: 20151111 Address after: 518057 Nanshan District Guangdong high tech Industrial Park, South Road, science and technology, ZTE building, Ministry of Justice Patentee after: ZTE Corp. Patentee after: SANECHIPS TECHNOLOGY Co.,Ltd. Address before: 518057 Nanshan District high tech Industrial Park, Guangdong, South Road, science and technology, ZTE building, legal department Patentee before: ZTE Corp. |
|
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20221202 Address after: 518055 Zhongxing Industrial Park, Liuxian Avenue, Xili street, Nanshan District, Shenzhen City, Guangdong Province Patentee after: SANECHIPS TECHNOLOGY Co.,Ltd. Address before: 518057 Ministry of justice, Zhongxing building, South Science and technology road, Nanshan District hi tech Industrial Park, Shenzhen, Guangdong Patentee before: ZTE Corp. Patentee before: SANECHIPS TECHNOLOGY Co.,Ltd. |