WO2014059829A1 - Method and device for processing mac frame data of ethernet - Google Patents

Method and device for processing mac frame data of ethernet Download PDF

Info

Publication number
WO2014059829A1
WO2014059829A1 PCT/CN2013/082491 CN2013082491W WO2014059829A1 WO 2014059829 A1 WO2014059829 A1 WO 2014059829A1 CN 2013082491 W CN2013082491 W CN 2013082491W WO 2014059829 A1 WO2014059829 A1 WO 2014059829A1
Authority
WO
WIPO (PCT)
Prior art keywords
mac frame
detection
mac
complete
data
Prior art date
Application number
PCT/CN2013/082491
Other languages
French (fr)
Chinese (zh)
Inventor
朱惠文
陈思思
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2014059829A1 publication Critical patent/WO2014059829A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to an Ethernet MAC frame data processing method and apparatus.
  • Ethernet MAC frame data processing method and apparatus BACKGROUND OF THE INVENTION Since the beginning of the 21st century, the communications industry has entered a period of rapid development, and broadband Internet has entered all aspects of life, and the requirements for network speed are also increasing. With the release of the IEEE P802.3ba standard, high-speed Ethernet has become the development direction of the current network.
  • current Ethernet data processing technologies have the following disadvantages:
  • Embodiments of the present invention provide an Ethernet MAC frame data processing method and apparatus, which are used to solve the problem that a data transmission rate of a MAC layer processing circuit of an Ethernet device in the prior art is small, and can only support a single service or a fixed service. The problem.
  • An embodiment of the present invention provides a method for processing an Ethernet MAC frame data, including: receiving a MAC frame of a different service type; and dividing, according to a preset length, a received MAC frame of each service type into a plurality of data blocks, where Each data block includes a complete MAC frame or/and a partial MAC frame; in each system cycle, MAC frame data is detected for data blocks corresponding to different service types in a preset order, and the detection result is stored in the corresponding storage. region.
  • An embodiment of the present invention provides an Ethernet MAC frame data processing apparatus, including: a receiving module, configured to receive MAC frames of different service types; and a reconstruction module, configured to receive each service type according to a preset length
  • the MAC frames are respectively divided into a plurality of data blocks, wherein each data block includes a complete MAC frame or/and a partial MAC frame; and the detecting module is configured to, according to a preset sequence, data corresponding to different service types in each system cycle.
  • the block performs MAC frame data detection, and stores the detection result in a corresponding storage area.
  • MAC frames of different types of services received in a system period are respectively divided into data blocks of the same size, and then MAC frames of data blocks corresponding to different service types are performed in a preset sequence in each system cycle.
  • the data is detected, so that the embodiment of the present invention only needs to perform MAC frame data detection on data blocks of the same length, and does not need to separately perform MAC frame data detection on data of different lengths according to the transmission rate of different types of services.
  • the MAC frame of the different types of services with different data transmission rates can be detected through a MAC frame data detection path, so that the embodiment of the present invention can be implemented on the basis of lower hardware configuration, and the processing resource overhead is reduced.
  • 1A is a service distribution of a time slot frame corresponding to a service with a data transmission rate of 100 Gb/s according to an embodiment of the present invention
  • FIG. 1B is a corresponding data transmission rate of 10 Gb/s according to an embodiment of the present invention. And the traffic distribution of the time slot frames of the hybrid service with the data transmission rate of 40 G/S;
  • FIG. 1C is a corresponding data transmission rate of 10 Gb/s and a data transmission rate of 40 G/S in the embodiment of the present invention;
  • Figure 1D shows the service distribution of time slot frames corresponding to 10 mixed services with a data transmission rate of 10 Gb/s in the embodiment of the present invention;
  • FIG. 2 is an embodiment of the present invention; Flowchart of the MAC frame data processing method; and
  • FIG. 3 is a flowchart of a MAC frame data processing apparatus according to an embodiment of the present invention.
  • Embodiments of the present invention provide a method for processing MAC frame data by using time division multiplexing, which divides received MAC frames of different service types into data blocks of the same size, and then, in each system cycle, MAC frame data detection is performed on data blocks corresponding to different service types in a preset order, thereby achieving the purpose of being able to handle multiple types of services of different types and different data transmission rates of hybrid access.
  • the MAC frame data processing method provided by the embodiment of the present invention is as shown in FIG. 2 .
  • Step 201 The receiving end receives MAC frames of different service types.
  • the input interface of the MAC layer receives MAC frames of different service types, and can also receive MAC frames of the same service.
  • the receiving end processes the data into MAC frame data according to the relevant protocol corresponding to the service type of the received data.
  • Step 202 The receiving end divides the received MAC frames of each service type into a plurality of data blocks according to a preset length, where each data block includes a complete MAC frame or/and a partial MAC frame.
  • the CGMII 100Gb/s MEDIA INDEPENDENT INTERFACE, Media Independent Interface
  • the interface transmits or receives 64 bits of data in each external interface cycle, where the start of the MAC frame exists in the 64-bit data block. When the word is controlled, it must be stored in the first word of the data block.
  • the data width of the XGMII (40Gb/s MEDIA INDEPENDENT INTERFACE) interface is 32 bits.
  • the interface transmits or receives 32-bit data every system cycle (this clock is the clock of the external interface, not the system clock), and exists in the 32-bit data block.
  • this clock is the clock of the external interface, not the system clock
  • the preset length of the data block can be determined according to the maximum throughput and data processing amount of the input interface of the MAC layer.
  • the preset length of the data block is 512 bits. It is also possible to determine the preset length of the data block by dividing the data transmission rate of the input interface of the MAC layer by the clock period of the data processing, for example, if the data transmission rate of the received service is 100 Gb/s, and the system is for one data.
  • the clock period for the MAC frame data detection of the block is 200 MHz, and the preset length of the data block is 512 bits. Due to the large length of the MAC frame in the actual situation, the length of the MAC frame may be less than 64 bits, and may also be as long as 10K.
  • any one data block may contain a complete MAC frame or/and a partial MAC frame, for example, one data block contains m complete MAC frames; or one data block contains m complete MAC frames and the last MAC frame contains the start a portion of the control word, wherein a portion of the last MAC frame containing the start control word is a partial MAC frame; or, a data block includes m complete MAC frames and a portion of the first MAC frame including an end control word, where A MAC frame contains the part of the end control word, that is, a partial MAC frame; or, one data block may contain m complete MAC frames, the first MAC frame contains the part of the end control word, and the last MAC frame contains the start a portion of the control word, wherein the first MAC frame includes a portion of the end control word, and the last MAC
  • Step 203 In each system cycle, the receiving end performs MAC frame data detection on the data blocks corresponding to different service types according to a preset sequence, and stores the detection result in the corresponding storage area. According to the maximum throughput weight of the data transmission amount of the MAC frame of each service type in one system period, the number of data blocks of each service type for performing MAC frame data detection in one system period can be respectively determined. Detection order. In practical applications, a data block that needs to perform MAC frame data detection in one system cycle may be defined as one slot frame.
  • the number and order of the data blocks of each service type in each slot frame may be determined according to the maximum throughput weight of the data transmission amount of the MAC frame of each service type received by the MAC layer interface in one system period, that is, The number and order of data blocks of each service type in each slot frame may be determined according to the data transmission rate of the MAC frame of each service type.
  • Each slot frame may be composed of a frame header, a frame tail, and n data blocks, where n is a positive integer, and each data block occupies one slot, that is, each data block occupies one clock cycle for the MAC frame. Data detection.
  • the total time n clock cycles for performing MAC frame data detection for one slot frame is referred to as one system cycle.
  • n 10 (that is, one slot frame contains 10 slots), and each data block occupies one slot.
  • the service distribution in any one slot frame is as shown in FIG. 1A, and each data block occupies one time slot, including MAC frame data of the service of equal length.
  • the data transmission rates of the services are 40 Gb/s and 10 Gb/s, respectively, in each slot frame, each data transmission rate is 40 Gb/s.
  • the service has 4 data blocks, occupying 4 time slots (which can be consecutive or discontinuous four time slots), and each service with a data transmission rate of 10 Gb/s has one data block, occupying one time respectively. Gap.
  • the service distribution combination in the slot frame is more likely, including but not limited to the service distribution of two typical slot frames listed below: Service distribution of a slot frame As shown in FIG. 1B, the data block with the data transmission rate of 40 Gb/s and the data block of the service 2 occupy the time slots 1 to 4 and the time slots 5 to 8, respectively, and the data of the service 3 and the service 4 with the data transmission rate of 10 Gb/ s .
  • the blocks occupy slot 9 and slot 10, respectively.
  • the service distribution of a time slot frame is as shown in FIG. 1C, the data block of the service with a data transmission rate of 40 Gb/s occupies the time slot 1 ⁇ 4, and the data transmission rate is 10 Gb/ s service 2 , service 3 , service 4.
  • the data blocks of Service 5 , Service 6 and Service 7 occupy slots 5 ⁇ 10, respectively.
  • the service distribution in a time slot frame is as shown in FIG. 1D, and there are 10 different services, each service.
  • One data block occupies one time slot each.
  • the amount of data received by the input interface of the MAC layer in one system cycle does not reach the maximum throughput of the input interface.
  • a data block occupies one time slot, and some time slots in the time slot frame may be rounded, that is, MAC frame data detection is not performed on any data block in a clock cycle corresponding to the time slots of these round spaces. For example, if the current system period only receives a MAC frame of a service with a data transmission rate of 10 Gb/s, the MAC frame of the service may be divided into data blocks of a preset length, and only one data block per system cycle.
  • each data block occupies one time slot in one time slot frame, and other time slots in the time slot frame are empty, that is, within one system cycle, only one clock cycle
  • the time is to perform MAC frame data detection on one data block, and the MAC frame data detection operation is not performed in other clock cycles.
  • the embodiment of the present invention divides the MAC frame of each service type into data blocks of a preset length, and always performs MAC frame data detection on the data block having a fixed preset length, so even if it is different
  • the MAC frames of the services with different data transmission rates are received in the time period, and the processing of the MAC frame data can still be performed, thereby supporting the switching of services with different data transmission rates.
  • each data block is detected by using a time division multiplexing manner, and the detection result of each data block is stored in the corresponding storage area according to the service classification, including the following two steps:
  • the MAC frame or the part of the MAC frame performs multiple character detection, and stores the detection result into the corresponding storage area according to the service type of the current data block; if multiple complete MAC frames or multiple partial MAC frames are extracted from the current data block Or, extracting at least one complete MAC frame and at least one partial MAC frame from the current data block, performing multiple character detection on each of the extracted complete MAC frames or/and partial MAC frames, respectively, according to the current
  • the service type of the data block stores the detection results of each complete MAC frame or/and part of the MAC frame into their respective storage areas.
  • one MAC frame includes a portion of the end control word and another MAC frame includes a portion that starts the control word
  • multiple character detections are respectively performed; or, A complete MAC frame and a partial MAC frame are extracted from the current data block, and multiple character detections are respectively performed; or, a complete MAC frame and two partial MAC frames are extracted from the current data block, and multiple characters are respectively performed.
  • the detection result of the complete MAC frame is stored in the corresponding MAC frame data detection result storage address, and the detection result of each part of the MAC frame belonging to the same MAC frame is stored as a complete detection result of the complete MAC frame. Enter the same MAC frame data detection result storage address as the complete detection result of the same MAC frame.
  • a buffer may be configured for each service to record the detection result of the corresponding MAC frame, where a complete MAC frame is divided into multiple partial MAC frames, and each partial MAC frame is located.
  • the detection results of the MAC frames of each part are sequentially stored in the same MAC frame data detection result storage address in the detection process, and the sum of the detection results of the respective partial MAC frames is used as the complete MAC frame.
  • the complete detection result only when the detection result in the storage address of the MAC frame data detection result is a complete detection result, the receiving end parses the complete MAC frame, and outputs the parsed MAC frame and the corresponding complete detection result.
  • performing multiple character detection on a complete MAC frame or/and a partial MAC frame includes: frame interval detection, preamble detection, source address detection, destination address detection, label detection, CRC (Cyclic Redundancy Check, loop) Redundancy check code) detection, frame type detection, and frame length detection.
  • the frame interval is detected by detecting the interval byte between the start control word of the current MAC frame and the end control word of the previous MAC frame, and recording the length of the detected interval byte.
  • the preamble detection is: detecting whether the preamble byte of the current MAC frame is incorrect.
  • the source address is detected as: detecting the source address byte of the current MAC frame, identifying and recording the source address.
  • the destination address is detected as: The destination address byte of each frame is detected, the destination address is identified and recorded, and the destination address type is determined.
  • the tag is detected as: The tag byte of the frame containing the tag is detected, and the tag is identified.
  • the frame length is detected as: Calculate the actual frame length and determine whether the frame long byte is correct.
  • the CRC is detected as: Performing a cyclic redundancy check on the data of the DA byte of the frame to the FCS byte to determine whether the frame has a CRC error.
  • the frame type detection is: detecting the frame type byte and determining the type of the frame.
  • the receiving end stores the detection result belonging to the same MAC frame in the same MAC frame data detection result storage address, Therefore, after the detection result of each partial MAC frame belonging to the same MAC frame is stored in the same MAC frame data detection result storage address, the same MAC frame is parsed according to the stored content in the MAC frame data detection result storage address. After outputting, the stored content in the MAC frame data detection result storage address is output as a complete detection result of the same MAC frame.
  • the processing of the MAC frame in step 204 specifically includes: if the complete detection result of any one MAC frame indicates that the arbitrary one MAC frame passes multiple character detection, according to the complete detection result of the any one MAC frame and the user configuration Transparently transmitting, regenerating, or filtering any MAC frame; if the complete detection result of any one MAC frame indicates that the arbitrary one MAC frame does not pass at least one character detection, according to the complete detection result of the any one MAC frame and the user configuration modification or Discard at least one MAC frame.
  • Transparent transmission means that the input data in the MAC frame is not changed, and is directly output;
  • Modifying refers to changing certain fields of the MAC frame. The value is then output;
  • the regeneration refers to regenerating the fields of the MAC frame to form a new MAC frame output;
  • filtering refers to filtering out the MAC frame that meets the filtering condition according to the detection result of the source address, the destination address, the label, and the frame type.
  • the detection result of the output source address, the destination address, the label, and the frame type has no error MAC frame;
  • the acquisition refers to extracting the MAC frame conforming to the capture condition from the data stream and providing the user with the read according to the user configuration and the complete detection result.
  • Discarding refers to discarding MAC frames that meet the discarding criteria based on user configuration and complete detection results, such as MAC frames containing errors.
  • the following takes the data transmission rate of the Ethernet MAC layer input interface as 100 Gb/s as an example. It describes in detail how to record each data block in the slot frame according to the service distribution in the slot frame in the current system period.
  • the detection result is stored in the corresponding storage area.
  • the detection result of any one of the data blocks in the slot frame and the MAC frame parsed according to the complete detection result may be stored in any one of the slots. In the storage area. If the current slot frame contains a service with a data transmission rate of 40 G/s and a service with a data transmission rate of 10 G/s, the data transmission rate may be any data block corresponding to the service of 40 G/S.
  • the detection result and the MAC frame parsed according to the complete detection result are stored in any one of the storage areas corresponding to the service type, and the detection result of the data block of the service with multiple data transmission rates of 10 G/s is analyzed according to the complete detection result.
  • the subsequent MAC frames are respectively stored in the corresponding storage areas according to the corresponding service types. If the current slot frame includes multiple services with a data transmission rate of 10 Gb/s, the detection result of the time slot corresponding to the service with multiple data transmission rates of 10 G/s and the MAC frame parsed according to the complete detection result are The corresponding service types are respectively stored in the corresponding storage areas. After a time slot frame is processed, if there is a parsed MAC frame, all the parsed MAC frames can be combined into one data output, fed back to the transmitting end, and all the detected detection results are output for the user. Query the performance of the MAC frame transmitted here.
  • an Ethernet MAC frame data processing apparatus is configured as shown in FIG. 3, and includes: a receiving module 301, configured to receive MAC frames of different service types; and a reconstruction module 302, configured The MAC frames of each type of service received are respectively divided into a plurality of data blocks according to a preset length, wherein each data block includes a complete MAC frame or/and a partial MAC frame; and the detecting module 303 is in each system cycle.
  • the MAC frame data is detected in the data block corresponding to the different service types according to the preset sequence, and the detection result is stored in the corresponding storage area; the parsing module 304 is set to exist in the storage area corresponding to the detected data block.
  • the complete detection result of the MAC frame is obtained by parsing the corresponding MAC frame according to the complete detection result of the obtained MAC frame, and outputting the complete detection result of the MAC frame.
  • the storage area corresponding to each type of service may be a memory. Since the device designed by the embodiment of the present invention always performs MAC frame data detection processing on a data block having a preset length, if the service type or data transmission rate of the received MAC frame is changed, the device can still perform data processing on the MAC frame. Therefore, the device designed by the embodiment of the present invention can support MAC frame data processing of different transmission rates and different service types, and can support switching between services of different data transmission rates, thereby saving hardware resources and having a wide application range.
  • the receiving end divides the MAC frames of different types of services received in one system period into data blocks of the same size, and then differently according to a preset sequence in each system cycle.
  • the data block corresponding to the service type performs the MAC frame data detection, so that the embodiment of the present invention only needs to perform MAC frame data detection on the data block of the same length, and does not need to separately perform MAC for different lengths of data according to the transmission rate of different types of services.
  • Frame data detection is
  • the MAC frame of the different types of services having different data transmission rates can be detected through a MAC frame data detection path, so that the embodiment of the present invention can be implemented on the basis of lower hardware configuration, and the processing resource overhead is reduced. Moreover, it can be applied to the case where MAC frames of multiple service types are transmitted in parallel at high speed, and can also handle the case of low-speed transmission of MAC frames of a single service type, and can handle different transmission rates of MAC frames of multiple service types. Therefore, it has good scalability, can meet the ever-increasing data transmission rate requirements and the ever-increasing MAC frame data processing requirements of the service category, and can be applied to various communication devices having Ethernet MAC layer processing requirements. A wide range of applications.
  • the computer program instructions may also be stored in a computer readable storage area operable in a particular manner by a computer or other programmable data processing device such that instructions stored in the computer readable storage area are generated Included is an article of manufacture of an instruction device that implements the functions specified in a block or blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)
  • Communication Control (AREA)

Abstract

Disclosed are a method and device for processing MAC frame data of Ethernet. The method comprises: receiving different service types of MAC frames; in accordance with a preset length, respectively dividing each service type of MAC frame into several data blocks, wherein each data block contains a complete MAC frame or/and a partial MAC frame; and within each system cycle, performing MAC frame data detection on the data blocks corresponding to different service types in accordance with a preset order, and storing the detection result in a corresponding storage area, so as to solve the problem that an MAC layer processing circuit of the current Ethernet device is low in transmission rate, can only support a single service or a fixed service, but cannot meet the development demand of the Ethernet device.

Description

一种以太网 MAC帧数据处理方法及装置 技术领域 本发明涉及通信技术领域, 特别涉及一种以太网 MAC帧数据处理方法及装置。 背景技术 自进入 21世纪,通信行业进入飞速发展期,宽带互联网已经进入生活的方方面面, 对于网络速度的要求也越来越高。 随着 IEEE P802.3ba标准的发布, 高速以太网已经 成为目前网络的发展方向。 目前, 当前的以太网数据处理技术存在以下缺点:  TECHNICAL FIELD The present invention relates to the field of communications technologies, and in particular, to an Ethernet MAC frame data processing method and apparatus. BACKGROUND OF THE INVENTION Since the beginning of the 21st century, the communications industry has entered a period of rapid development, and broadband Internet has entered all aspects of life, and the requirements for network speed are also increasing. With the release of the IEEE P802.3ba standard, high-speed Ethernet has become the development direction of the current network. Currently, current Ethernet data processing technologies have the following disadvantages:
1 ) 当以太网 MAC ( Medium/Media Access Control, 介质访问控制) 数据流中混 合了多种业务时, 需要多路处理通道, 资源开销大; 1) When a variety of services are mixed in the Medium MAC Address (Media Access Control) data stream, multiple processing channels are required, and the resource overhead is large;
2) 在确定了当前的业务处理方式后, 不能实时进行业务切换或业务切换的余地 小。 由此可见, 由于目前的以太网设备的 MAC层处理电路的数据传输速率较小, 只 能支持单业务或固定业务, 已经不能满足以太网设备发展的需求。 发明内容 本发明实施例提供一种以太网 MAC帧数据处理方法及装置, 用以解决现有技术 中的以太网设备的 MAC层处理电路的数据传输速率较小, 只能支持单业务或固定业 务的问题。 本发明实施例提供一种以太网 MAC帧数据处理方法, 包括: 接收不同业务类型的 MAC帧; 根据预设长度将接收到的每一种业务类型的 MAC帧分别划分成若干数据块, 其 中, 每个数据块内包含完整 MAC帧或 /和部分 MAC帧; 在各个系统周期内, 按照预设的顺序对不同业务类型对应的数据块进行 MAC帧 数据检测, 并将检测结果存入对应的存储区域。 本发明实施例提供一种以太网 MAC帧数据处理装置, 包括: 接收模块, 设置为接收不同业务类型的 MAC帧; 重构模块, 设置为根据预设长度将接收到的每一种业务类型的 MAC帧分别划分 成若干数据块, 其中, 每个数据块内包含完整 MAC帧或 /和部分 MAC帧; 检测模块, 设置为在各个系统周期内, 按照预设的顺序对不同业务类型对应的数 据块进行 MAC帧数据检测, 并将检测结果存入对应的存储区域。 本发明实施例将一个系统周期内接收到的不同类型业务的 MAC帧分别划分成同 等大小的数据块, 然后在各个系统周期内, 按照预设的顺序对不同业务类型对应的数 据块进行 MAC帧数据检测, 从而使得本发明实施例只需要对同等长度的数据块进行 MAC帧数据检测,而不需要根据不同类型业务的传输速率对不同长度的数据分别进行 MAC帧数据检测。 这样, 通过一个 MAC帧数据检测通路就可以检测具有不同数据传 输速率的不同类型的业务的 MAC帧, 从而使得本发明实施例在配置较低的硬件基础 上就可以实现, 降低处理资源的开销, 而且既能够应用于多种业务类型的 MAC帧并 行高速地传输的情况, 也能够处理单业务类型的 MAC帧低速传输的情况, 并且能够 处理多种业务类型的 MAC帧采用不同传输速率的情况, 因此, 具有很好的扩展性, 能够满足目前越来越高的数据传输速率要求和业务种类不断增加的 MAC帧数据处理 需求, 而且可应用于有以太网 MAC层处理要求的各种通信设备, 应用范围广泛。 附图说明 图 1A为本发明实施例中对应一种数据传输速率为 100Gb/s的业务的时隙帧的业 务分布情况; 图 1B为本发明实施例中对应两种数据传输速率为 10Gb/s和两种数据传输速率为 40G/S的混合业务的时隙帧的业务分布情况; 图 1C为本发明实施例中对应六种数据传输速率为 10Gb/s和一种数据传输速率为 40G/S的混合业务的时隙帧的业务分布情况; 图 1D为本发明实施例中对应 10种数据传输速率为为 10Gb/s的混合业务的时隙 帧的业务分布情况; 图 2为本发明实施例中的 MAC帧数据处理方法流程图; 以及 图 3为本发明实施例中的 MAC帧数据处理装置流程图。 具体实施方式 本发明实施例提供了一种采用时分复用的 MAC帧数据处理方法, 该方法将接收 到的不同业务类型的 MAC帧分别划分成同等大小的数据块,然后在各个系统周期内, 按照预设的顺序对不同业务类型对应的数据块进行 MAC帧数据检测, 从而达到能够 处理混合接入的不同类型和不同数据传输速率的多种业务的目的。 下面结合附图具体说明本发明的优选实施例。 本发明实施例提供的 MAC帧数据处理方法如图 2所示。 步骤 201 : 接收端接收不同业务类型的 MAC帧。 MAC层的输入接口接收不同业务类型的 MAC帧,也可以接收同一种业务的 MAC 帧。 实际应用中, 接收端在接收到的数据在进入 MAC层时, 根据接收到的数据的业 务类型对应的相关协议, 将其处理成 MAC帧数据。 步骤 202:接收端根据预设长度将接收到的每一种业务类型的 MAC帧分别划分成 若干数据块, 其中, 每个数据块内包含完整 MAC帧或 /和部分 MAC帧。 例如, CGMII ( 100Gb/s MEDIA INDEPENDENT INTERFACE, 媒体独立接口) 接口的数据位宽为 64bit, 该接口在每个外部接口周期内发射或者接收 64bit数据, 其 中,当 64bit数据块中存在 MAC帧的开始控制字时,则其必定存放于数据块的首字中。 而 XGMII(40Gb/s MEDIA INDEPENDENT INTERFACE)接口的数据位宽为 32bit, 该接口每个系统周期(此时钟为该外部接口的时钟,不是系统时钟)发射或者接收 32bit 数据, 当 32bit数据块中存在 MAC帧的开始控制字时, 则其必定存放在数据块的首字 中。 根据 MAC层的输入接口的最大吞吐量和数据处理量可以确定数据块的预设长度。 例如, 若 MAC层的输入接口的最大吞吐量为 100Gb, 而数据处理量为 200Mb, 此时, 数据块的预设长度为 512bit。也可以通过 MAC层的输入接口接的数据传输速率除以数 据处理的时钟周期, 确定数据块的预设长度, 例如, 若接收到的业务的数据传输速率 为 100Gb/s, 而系统对一个数据块进行 MAC帧数据检测的时钟周期为 200MHz, 则数 据块的预设长度为 512bit。 由于实际情况中的 MAC帧的长度范围较大, MAC帧的长度可能小于 64bit, 也 可能会长达 10K。 因此, 可能会出现将一个 MAC帧划分为多个数据块的情况, 也可能会出现一个 数据块中包含多个 MAC帧的情况。 任意一个数据块可能会包含完整 MAC帧或 /和部分 MAC帧, 例如, 一个数据块 中包含 m个完整的 MAC帧; 或者, 一个数据块包含 m个完整的 MAC帧和最后一个 MAC帧包含开始控制字 的部分, 其中, 最后一个 MAC帧包含开始控制字的部分即为部分 MAC帧; 或者, 一个数据块包含 m个完整 MAC帧和第一个 MAC帧包含结束控制字的部 分, 其中, 第一个 MAC帧包含结束控制字的部分, 即为部分 MAC帧; 或者, 一个数据块可能包含 m个完整的 MAC帧、 第一个 MAC帧包含结束控制 字的部分, 和最后一个 MAC帧包含开始控制字的部分, 其中, 第一个 MAC帧包含结 束控制字的部分, 和最后一个 MAC帧包含开始控制字的部分, 均为部分 MAC帧; 上述 m均为大于 0的正整数。 步骤 203: 在各个系统周期内, 接收端按照预设的顺序对不同业务类型对应的数 据块进行 MAC帧数据检测, 并将检测结果存入对应的存储区域。 根据每一种业务类型的 MAC帧在一个系统周期内的数据传输量所占的最大吞吐 量权重, 可以分别确定一个系统周期内进行 MAC帧数据检测的每一种业务类型的数 据块的数目和检测顺序。 在实际应用中, 可以将一个系统周期内需要进行 MAC帧数据检测的数据块定义 为一个时隙帧。 每个时隙帧内的各个业务类型的数据块的数目和顺序可以根据一个系 统周期内 MAC层接口接收到的各个业务类型的 MAC帧的数据传输量所占的最大吞吐 量权重确定, 即, 每个时隙帧内的各个业务类型的数据块的数目和顺序可以根据各个 业务类型的 MAC帧的数据传输速率确定。 每个时隙帧可以由帧头、 帧尾和 n个数据块组成, 其中, n为正整数, 而每个数 据块占用一个时隙, 即每个数据块占用一个时钟周期的时间进行 MAC帧数据检测。 将 1个时隙帧进行 MAC帧数据检测的总时间 n个时钟周期称为一个系统周期。 例如, 若以太网的 MAC层输入接口的 MAC帧的数据传输速率为 100Gb/s, 此时 n为 10 (即一个时隙帧包含 10个时隙), 每个数据块占用一个时隙。 在当前系统周期接收到的 MAC帧始终对应一种数据传输速率为 100Gb/s的业务 时, 任意一个时隙帧中的业务分布如图 1A所示, 每个数据块均占用一个时隙, 包含 了长度相等的该业务的 MAC帧数据。 在当前系统周期接收到的若干 MAC帧对应的是混合业务, 且业务的数据传输速 率分别为 40Gb/s和 10Gb/s时, 在每一个时隙帧中, 每种数据传输速率为 40Gb/s的业 务有 4个数据块, 占用了四个时隙(可以是连续或不连续的四个时隙), 每种数据传输 速率为 lOGb/s的业务各有一个数据块, 分别占用了一个时隙。 在接收到混合业务的 MAC帧的情况下, 时隙帧中的业务分布组合可能性较多, 包括但不限于下面列举两种典型的时隙帧的业务分布: 一种时隙帧的业务分布如图 1B所示, 数据传输速率为 40Gb/s的业务 和业务 2 的数据块分别占用时隙 1~4和时隙 5~8, 数据传输速率为 10Gb/S的业务 3和业务 4的 数据块分别占用时隙 9和时隙 10。 或者, 一种时隙帧的业务分布如图 1C所示, 数据传输速率为 40Gb/s的业务 的 数据块占用时隙 1~4, 数据传输速率为 10Gb/S的业务 2、 业务 3、 业务 4、 业务 5、 业务 6和业务 7的数据块分别占用时隙 5~10。 在当前系统周期接收到的若干 MAC帧对应多种数据传输速率均为 10Gb/s的业务 时, 一种时隙帧中的业务分布如图 1D所示, 共 10种不同的业务, 每种业务的一个数 据块各占用一个时隙。 若由于接收到的 MAC帧的业务种类较少或数据传输速率较低, 而使得一个系统 周期内 MAC层的输入接口接收到的数据量达不到该输入接口的最大吞吐量, 此时, 每一个数据块占用一个时隙, 而时隙帧中的部分时隙可以轮空, 即在这些轮空的时隙 对应的时钟周期内, 不对任何数据块进行 MAC帧数据检测。 例如, 当前系统周期仅接收到一种数据传输速率为 10Gb/s的业务的 MAC帧, 则 可以将该业务的 MAC帧划分成预设长度的数据块后, 每个系统周期仅对一个数据块 进行 MAC帧数据检测, 即在此情况下, 令每一个数据块占用一个时隙帧中的一个时 隙, 该时隙帧中的其它时隙轮空, 即一个系统周期内, 仅在一个时钟周期的时间对一 个数据块进行 MAC帧数据检测, 在其它的时钟周期内不进行 MAC帧数据检测操作。 这样, 由于本发明实施例将每一种业务类型的 MAC帧划分成了预设长度的数据 块, 并且始终是对具有固定的预设长度的数据块进行 MAC帧数据检测, 因此, 即使 在不同时间段内接收到的是具有不同数据传输速率的业务的 MAC帧, 仍然能够进行 MAC帧数据的处理, 故而支持具有不同数据传输速率的业务的切换。 具体地, 采用时分复用的方式对每一个数据块进行检测, 并将每一个数据块的检 测结果根据业务分类存入对应的存储区域, 包括如下 2个步骤: 2) After determining the current business processing mode, there is little room for real-time business switching or business switching. It can be seen that the current data transmission rate of the MAC layer processing circuit of the Ethernet device is small, and only supports single service or fixed service, which cannot meet the requirements of the development of the Ethernet device. SUMMARY OF THE INVENTION Embodiments of the present invention provide an Ethernet MAC frame data processing method and apparatus, which are used to solve the problem that a data transmission rate of a MAC layer processing circuit of an Ethernet device in the prior art is small, and can only support a single service or a fixed service. The problem. An embodiment of the present invention provides a method for processing an Ethernet MAC frame data, including: receiving a MAC frame of a different service type; and dividing, according to a preset length, a received MAC frame of each service type into a plurality of data blocks, where Each data block includes a complete MAC frame or/and a partial MAC frame; in each system cycle, MAC frame data is detected for data blocks corresponding to different service types in a preset order, and the detection result is stored in the corresponding storage. region. An embodiment of the present invention provides an Ethernet MAC frame data processing apparatus, including: a receiving module, configured to receive MAC frames of different service types; and a reconstruction module, configured to receive each service type according to a preset length The MAC frames are respectively divided into a plurality of data blocks, wherein each data block includes a complete MAC frame or/and a partial MAC frame; and the detecting module is configured to, according to a preset sequence, data corresponding to different service types in each system cycle. The block performs MAC frame data detection, and stores the detection result in a corresponding storage area. In the embodiment of the present invention, MAC frames of different types of services received in a system period are respectively divided into data blocks of the same size, and then MAC frames of data blocks corresponding to different service types are performed in a preset sequence in each system cycle. The data is detected, so that the embodiment of the present invention only needs to perform MAC frame data detection on data blocks of the same length, and does not need to separately perform MAC frame data detection on data of different lengths according to the transmission rate of different types of services. In this way, the MAC frame of the different types of services with different data transmission rates can be detected through a MAC frame data detection path, so that the embodiment of the present invention can be implemented on the basis of lower hardware configuration, and the processing resource overhead is reduced. Moreover, it can be applied to the case where MAC frames of multiple service types are transmitted in parallel at high speed, and can also handle the case of low-speed transmission of MAC frames of a single service type, and can handle different transmission rates of MAC frames of multiple service types. Therefore, it has good scalability, can meet the ever-increasing data transmission rate requirements and the ever-increasing MAC frame data processing requirements of the service category, and can be applied to various communication devices having Ethernet MAC layer processing requirements. A wide range of applications. 1A is a service distribution of a time slot frame corresponding to a service with a data transmission rate of 100 Gb/s according to an embodiment of the present invention; FIG. 1B is a corresponding data transmission rate of 10 Gb/s according to an embodiment of the present invention; And the traffic distribution of the time slot frames of the hybrid service with the data transmission rate of 40 G/S; FIG. 1C is a corresponding data transmission rate of 10 Gb/s and a data transmission rate of 40 G/S in the embodiment of the present invention; Figure 1D shows the service distribution of time slot frames corresponding to 10 mixed services with a data transmission rate of 10 Gb/s in the embodiment of the present invention; FIG. 2 is an embodiment of the present invention; Flowchart of the MAC frame data processing method; and FIG. 3 is a flowchart of a MAC frame data processing apparatus according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS Embodiments of the present invention provide a method for processing MAC frame data by using time division multiplexing, which divides received MAC frames of different service types into data blocks of the same size, and then, in each system cycle, MAC frame data detection is performed on data blocks corresponding to different service types in a preset order, thereby achieving the purpose of being able to handle multiple types of services of different types and different data transmission rates of hybrid access. Preferred embodiments of the present invention will be specifically described below with reference to the accompanying drawings. The MAC frame data processing method provided by the embodiment of the present invention is as shown in FIG. 2 . Step 201: The receiving end receives MAC frames of different service types. The input interface of the MAC layer receives MAC frames of different service types, and can also receive MAC frames of the same service. In practical applications, when the received data enters the MAC layer, the receiving end processes the data into MAC frame data according to the relevant protocol corresponding to the service type of the received data. Step 202: The receiving end divides the received MAC frames of each service type into a plurality of data blocks according to a preset length, where each data block includes a complete MAC frame or/and a partial MAC frame. For example, the CGMII (100Gb/s MEDIA INDEPENDENT INTERFACE, Media Independent Interface) interface has a data bit width of 64 bits. The interface transmits or receives 64 bits of data in each external interface cycle, where the start of the MAC frame exists in the 64-bit data block. When the word is controlled, it must be stored in the first word of the data block. The data width of the XGMII (40Gb/s MEDIA INDEPENDENT INTERFACE) interface is 32 bits. The interface transmits or receives 32-bit data every system cycle (this clock is the clock of the external interface, not the system clock), and exists in the 32-bit data block. When the start control word of the MAC frame is, it must be stored in the first word of the data block. The preset length of the data block can be determined according to the maximum throughput and data processing amount of the input interface of the MAC layer. For example, if the maximum throughput of the input interface of the MAC layer is 100 Gb and the data processing capacity is 200 Mb, the preset length of the data block is 512 bits. It is also possible to determine the preset length of the data block by dividing the data transmission rate of the input interface of the MAC layer by the clock period of the data processing, for example, if the data transmission rate of the received service is 100 Gb/s, and the system is for one data. The clock period for the MAC frame data detection of the block is 200 MHz, and the preset length of the data block is 512 bits. Due to the large length of the MAC frame in the actual situation, the length of the MAC frame may be less than 64 bits, and may also be as long as 10K. Therefore, there may be a case where one MAC frame is divided into a plurality of data blocks, and a case where a plurality of MAC frames are included in one data block may occur. Any one data block may contain a complete MAC frame or/and a partial MAC frame, for example, one data block contains m complete MAC frames; or one data block contains m complete MAC frames and the last MAC frame contains the start a portion of the control word, wherein a portion of the last MAC frame containing the start control word is a partial MAC frame; or, a data block includes m complete MAC frames and a portion of the first MAC frame including an end control word, where A MAC frame contains the part of the end control word, that is, a partial MAC frame; or, one data block may contain m complete MAC frames, the first MAC frame contains the part of the end control word, and the last MAC frame contains the start a portion of the control word, wherein the first MAC frame includes a portion of the end control word, and the last MAC frame includes a portion of the start control word, both of which are partial MAC frames; the above m are positive integers greater than zero. Step 203: In each system cycle, the receiving end performs MAC frame data detection on the data blocks corresponding to different service types according to a preset sequence, and stores the detection result in the corresponding storage area. According to the maximum throughput weight of the data transmission amount of the MAC frame of each service type in one system period, the number of data blocks of each service type for performing MAC frame data detection in one system period can be respectively determined. Detection order. In practical applications, a data block that needs to perform MAC frame data detection in one system cycle may be defined as one slot frame. The number and order of the data blocks of each service type in each slot frame may be determined according to the maximum throughput weight of the data transmission amount of the MAC frame of each service type received by the MAC layer interface in one system period, that is, The number and order of data blocks of each service type in each slot frame may be determined according to the data transmission rate of the MAC frame of each service type. Each slot frame may be composed of a frame header, a frame tail, and n data blocks, where n is a positive integer, and each data block occupies one slot, that is, each data block occupies one clock cycle for the MAC frame. Data detection. The total time n clock cycles for performing MAC frame data detection for one slot frame is referred to as one system cycle. For example, if the data transmission rate of the MAC frame of the MAC layer input interface of the Ethernet is 100 Gb/s, then n is 10 (that is, one slot frame contains 10 slots), and each data block occupies one slot. When the MAC frame received in the current system cycle always corresponds to a service with a data transmission rate of 100 Gb/s, the service distribution in any one slot frame is as shown in FIG. 1A, and each data block occupies one time slot, including MAC frame data of the service of equal length. When several MAC frames received in the current system cycle correspond to hybrid services, and the data transmission rates of the services are 40 Gb/s and 10 Gb/s, respectively, in each slot frame, each data transmission rate is 40 Gb/s. The service has 4 data blocks, occupying 4 time slots (which can be consecutive or discontinuous four time slots), and each service with a data transmission rate of 10 Gb/s has one data block, occupying one time respectively. Gap. In the case of receiving the MAC frame of the hybrid service, the service distribution combination in the slot frame is more likely, including but not limited to the service distribution of two typical slot frames listed below: Service distribution of a slot frame As shown in FIG. 1B, the data block with the data transmission rate of 40 Gb/s and the data block of the service 2 occupy the time slots 1 to 4 and the time slots 5 to 8, respectively, and the data of the service 3 and the service 4 with the data transmission rate of 10 Gb/ s . The blocks occupy slot 9 and slot 10, respectively. Or, the service distribution of a time slot frame is as shown in FIG. 1C, the data block of the service with a data transmission rate of 40 Gb/s occupies the time slot 1~4, and the data transmission rate is 10 Gb/ s service 2 , service 3 , service 4. The data blocks of Service 5 , Service 6 and Service 7 occupy slots 5~10, respectively. When several MAC frames received in the current system cycle correspond to multiple services with a data transmission rate of 10 Gb/s, the service distribution in a time slot frame is as shown in FIG. 1D, and there are 10 different services, each service. One data block occupies one time slot each. If the number of services of the received MAC frame is small or the data transmission rate is low, the amount of data received by the input interface of the MAC layer in one system cycle does not reach the maximum throughput of the input interface. A data block occupies one time slot, and some time slots in the time slot frame may be rounded, that is, MAC frame data detection is not performed on any data block in a clock cycle corresponding to the time slots of these round spaces. For example, if the current system period only receives a MAC frame of a service with a data transmission rate of 10 Gb/s, the MAC frame of the service may be divided into data blocks of a preset length, and only one data block per system cycle. Perform MAC frame data detection, that is, in this case, each data block occupies one time slot in one time slot frame, and other time slots in the time slot frame are empty, that is, within one system cycle, only one clock cycle The time is to perform MAC frame data detection on one data block, and the MAC frame data detection operation is not performed in other clock cycles. In this way, the embodiment of the present invention divides the MAC frame of each service type into data blocks of a preset length, and always performs MAC frame data detection on the data block having a fixed preset length, so even if it is different The MAC frames of the services with different data transmission rates are received in the time period, and the processing of the MAC frame data can still be performed, thereby supporting the switching of services with different data transmission rates. Specifically, each data block is detected by using a time division multiplexing manner, and the detection result of each data block is stored in the corresponding storage area according to the service classification, including the following two steps:
1 )通过对任意一个数据块进行 MAC帧的开始控制字和结束控制字的查找, 从中 提取出完整 MAC帧或 /和部分 MAC帧; 1) extracting a complete MAC frame or/and a partial MAC frame by performing a lookup of a start control word and an end control word of a MAC frame for any one of the data blocks;
2) 对提取出的完整 MAC帧或 /和部分 MAC帧进行多项字符检测, 包括: 若从当前数据块中提取出一个完整 MAC帧或者一个部分 MAC帧, 则对该完整2) performing multiple character detection on the extracted complete MAC frame or / and part of the MAC frame, including: if a complete MAC frame or a partial MAC frame is extracted from the current data block, the complete
MAC帧或者该部分 MAC帧进行多项字符检测,并根据当前数据块的业务类型将检测 结果存入对应的存储区域; 若从当前数据块中提取出多个完整 MAC帧或多个部分 MAC帧,或者,从当前数 据块中提取出至少一个的完整 MAC帧和至少一个的部分 MAC帧,则分别对提取出的 每一个完整 MAC帧或 /和部分 MAC帧进行多项字符检测, 并根据当前数据块的业务 类型将每一个完整 MAC帧或 /和部分 MAC帧的检测结果分别存入各自对应的存储区 域。 例如,若从当前数据块中提取出两个部分 MAC帧(即一个 MAC帧包括结束控制 字的部分和另一个 MAC帧包括开始控制字的部分), 并分别进行多项字符检测; 或者,从当前数据块中提取出一个完整 MAC帧和一个部分 MAC帧,并分别进行 多项字符检测; 或者,从当前数据块中提取出一个完整 MAC帧和两个部分 MAC帧,并分别进行 多项字符检测; 或者,从当前数据块中提取出多个完整 MAC帧和一个部分 MAC帧,并分别进行 多项字符检测; 或者,从当前数据块中提取出多个完整 MAC帧和 2个部分 MAC帧,并分别进行 多项字符检测。 在上述 2个步骤中,将完整 MAC帧的检测结果存入对应的 MAC帧数据检测结果 存储地址中,作为完整 MAC帧的完整检测结果,将属于同一 MAC帧的各个部分 MAC 帧的检测结果存入同一 MAC帧数据检测结果存储地址中,作为同一 MAC帧的完整检 测结果。 在实际应用中, 可以为每种业务配置一个缓存器, 用于记录对应的 MAC帧的检 测结果,其中,在一个完整的 MAC帧被划分成多个部分 MAC帧时,且各个部分 MAC 帧位于不同的数据块中时, 其各个部分 MAC帧的检测结果会在检测过程中依次被存 入同一 MAC帧数据检测结果存储地址中,将各个部分 MAC帧的检测结果的总和作为 上述完整的 MAC帧的完整检测结果,只有在 MAC帧数据检测结果存储地址中的检测 结果是完整检测结果时, 接收端才会对该完整的 MAC帧进行解析, 并输出解析后的 MAC帧和对应的完整检测结果。 本发明实施例中,对完整 MAC帧或 /和部分 MAC帧进行多项字符检测具体包括: 帧间隔检测、 前导码检测、 源地址检测、 目的地址检测、 标签检测、 CRC ( Cyclic Redundancy Check, 循环冗余校验码) 检测、 帧类型检测和帧长检测等。 帧间隔检测为:检测当前 MAC帧的开始控制字到上一个 MAC帧的结束控制字之 间的间隔字节, 记录检测出的间隔字节的长度。 前导码检测为: 检测当前 MAC帧的前导码字节是否有误。 源地址检测为: 检测当前 MAC帧的源地址字节, 识别并记录源地址。 目的地址检测为: 对每个帧的目的地址字节进行检测, 识别并记录目的地址, 判 断目的地址类型。 标签检测为: 对含有标签的帧的标签字节进行检测, 识别标签。 帧长检测为: 计算实际帧长, 判断帧长字节是否正确。 The MAC frame or the part of the MAC frame performs multiple character detection, and stores the detection result into the corresponding storage area according to the service type of the current data block; if multiple complete MAC frames or multiple partial MAC frames are extracted from the current data block Or, extracting at least one complete MAC frame and at least one partial MAC frame from the current data block, performing multiple character detection on each of the extracted complete MAC frames or/and partial MAC frames, respectively, according to the current The service type of the data block stores the detection results of each complete MAC frame or/and part of the MAC frame into their respective storage areas. For example, if two partial MAC frames are extracted from the current data block (ie, one MAC frame includes a portion of the end control word and another MAC frame includes a portion that starts the control word), and multiple character detections are respectively performed; or, A complete MAC frame and a partial MAC frame are extracted from the current data block, and multiple character detections are respectively performed; or, a complete MAC frame and two partial MAC frames are extracted from the current data block, and multiple characters are respectively performed. Detecting; or, extracting multiple complete MAC frames and one partial MAC frame from the current data block, and performing multiple character detection respectively; or extracting multiple complete MAC frames and two partial MAC frames from the current data block And perform multiple character detection separately. In the above two steps, the detection result of the complete MAC frame is stored in the corresponding MAC frame data detection result storage address, and the detection result of each part of the MAC frame belonging to the same MAC frame is stored as a complete detection result of the complete MAC frame. Enter the same MAC frame data detection result storage address as the complete detection result of the same MAC frame. In a practical application, a buffer may be configured for each service to record the detection result of the corresponding MAC frame, where a complete MAC frame is divided into multiple partial MAC frames, and each partial MAC frame is located. When different data blocks are used, the detection results of the MAC frames of each part are sequentially stored in the same MAC frame data detection result storage address in the detection process, and the sum of the detection results of the respective partial MAC frames is used as the complete MAC frame. The complete detection result, only when the detection result in the storage address of the MAC frame data detection result is a complete detection result, the receiving end parses the complete MAC frame, and outputs the parsed MAC frame and the corresponding complete detection result. . In the embodiment of the present invention, performing multiple character detection on a complete MAC frame or/and a partial MAC frame includes: frame interval detection, preamble detection, source address detection, destination address detection, label detection, CRC (Cyclic Redundancy Check, loop) Redundancy check code) detection, frame type detection, and frame length detection. The frame interval is detected by detecting the interval byte between the start control word of the current MAC frame and the end control word of the previous MAC frame, and recording the length of the detected interval byte. The preamble detection is: detecting whether the preamble byte of the current MAC frame is incorrect. The source address is detected as: detecting the source address byte of the current MAC frame, identifying and recording the source address. The destination address is detected as: The destination address byte of each frame is detected, the destination address is identified and recorded, and the destination address type is determined. The tag is detected as: The tag byte of the frame containing the tag is detected, and the tag is identified. The frame length is detected as: Calculate the actual frame length and determine whether the frame long byte is correct.
CRC检测为: 对帧的 DA字节到 FCS字节的数据做循环冗余校验,判断帧是否存 在 CRC错误。 帧类型检测为: 对帧类型字节进行检测, 判断帧的类型。 步骤 204:接收端若检测完毕的数据块对应的存储区域内存在 MAC帧的完整检测 结果,根据获得的 MAC帧的完整检测结果对相应的 MAC帧进行解析处里后输出,并 将 MAC帧的完整检测结果输出。 对于完整 MAC帧,直接获取对应的 MAC帧数据检测结果存储地址中的检测结果 对该 MAC帧进行解析后输出, 并作为该完整 MAC帧的完整检测结果输出。 对于部分 MAC帧,将当前部分 MAC帧的检测结果存入对应的 MAC帧数据检测 结果存储地址中后,由于接收端将属于同一 MAC帧的检测结果存入同一 MAC帧数据 检测结果存储地址中, 因此,等到属于该同一 MAC帧的各个部分 MAC帧的检测结果 都被存入同一 MAC帧数据检测结果存储地址后,根据该 MAC帧数据检测结果存储地 址中的存储内容对该同一 MAC帧进行解析后输出,并将该 MAC帧数据检测结果存储 地址中的存储内容作为该同一 MAC帧的完整检测结果输出。 另外, 步骤 204中对 MAC帧的处理, 具体包括: 若任意一个 MAC帧的完整检测结果表明该任意一个 MAC帧通过了多项字符检 测, 则根据该任意一个 MAC帧的完整检测结果以及用户配置透传、 再生或过滤任意 一个 MAC帧; 若任意一个 MAC帧的完整检测结果表明该任意一个 MAC帧未通过至少一项字符 检测, 则根据该任意一个 MAC帧的完整检测结果以及用户配置修改或丢弃至少一个 MAC帧。 而上述对 MAC帧进行的透传、 修改、 再生、 过滤、 捕获或丢弃等操作的具体定 义如下: 透传指不改变 MAC帧中的输入数据, 直接输出; 修改指改变 MAC帧的某些字段的值, 然后输出; 再生指重新生成 MAC帧的各字段, 组成新的 MAC帧输出; 过滤指根据对源地址、 目的地址、 标签、 帧类型的检测结果, 滤除符合过滤条件 的 MAC 帧, 而输出源地址、 目的地址、 标签、 帧类型的检测结果没有错误的 MAC 帧; 捕获指根据用户配置和完整检测结果, 从数据流中提取符合捕获条件的 MAC帧 提供给用户读取。 丢弃指根据用户配置和完整检测结果, 丢弃符合丢弃条件的 MAC帧, 例如含有 错误的 MAC帧。 下面以以太网 MAC层输入接口的数据传输速率为 100Gb/s为例, 详细介绍如何 根据当前系统周期内的时隙帧中的业务分布情况将已记录的该时隙帧中的每一个数据 块的检测结果存入对应的存储区域中。 若当前时隙帧中仅包含一种数据传输速率为 100Gb/s的业务, 则可将该时隙帧中 的任意一个数据块的检测结果和根据完整检测结果解析后的 MAC帧存入任意一个存 储区域中。 若当前时隙帧中包含一种数据传输速率为 40G/S 的业务和多种数据传输速率为 lOG/s的业务,则可以将数据传输速率为 40G/S的业务对应的任意一个数据块的检测结 果和根据完整检测结果解析后的 MAC帧存入与该业务类型对应的任意一个存储区域 中, 将多种数据传输速率为 lOG/s的业务的数据块的检测结果和根据完整检测结果解 析后的 MAC帧根据对应的业务类型分别存入与相对应的存储区域中。 若当前时隙帧中包含多种数据传输速率为 lOGb/s的业务,则将多种数据传输速率 为 lOG/s的业务对应的时隙的检测结果和根据完整检测结果解析后的 MAC帧根据对 应的业务类型分别存入与相对应的存储区域中。 在一个时隙帧处理完毕后,若存在解析后的 MAC帧,则可以将所有解析后的 MAC 帧合并成一路数据输出, 反馈至发送端, 并将已记录所有的检测结果输出, 以供用户 查询传输到此处的 MAC帧的性能情况。 基于上述技术方案, 本发明实施例中, 设计的一种以太网 MAC帧数据处理装置 如图 3所示, 包括: 接收模块 301, 设置为接收不同业务类型的 MAC帧; 重构模块 302,设置为根据预设长度将接收到的每一种业务类型的 MAC帧分别划 分成若干数据块, 其中, 每个数据块内包含完整 MAC帧或 /和部分 MAC帧; 检测模块 303, 在各个系统周期内, 按照预设的顺序对不同业务类型对应的数据 块进行 MAC帧数据检测, 并将检测结果存入对应的存储区域; 解析模块 304,设置为在检测完毕的数据块对应的存储区域内存在 MAC帧的完整 检测结果,根据获得的 MAC帧的完整检测结果对相应的 MAC帧进行解析处里后输出, 并将该 MAC帧的完整检测结果输出。 在本发明实施例设计的装置中, 每一种业务类型对应的存储区域可以是一个存储 器。 由于本发明实施例设计的装置始终对具有预设长度的数据块进行 MAC帧数据检 测处理, 若将接收的 MAC帧的业务类型或者数据传输速率改变, 该装置仍然能够对 MAC帧进行数据处理, 因此, 本发明实施例设计的装置可以支持不同传输速率、不同 业务类型的 MAC帧数据处理, 并且能够支持不同数据传输速率的业务之间的切换, 故而能够节约硬件资源, 并且适用范围广泛。 本领域技术人员在理解上述实施例中的全部或部分步骤的情况下, 可以通过 FPGA (Field-Programmable Gate Array, 现场可编程门阵列) 或 ASIC (Application Specific Integrated Circuit, 专用集成电路) 方式将之实现。 综上所述, 本发明实施例中, 接收端将一个系统周期内接收到的不同类型业务的 MAC帧分别划分成同等大小的数据块,然后在各个系统周期内,按照预设的顺序对不 同业务类型对应的数据块进行 MAC帧数据检测, 从而使得本发明实施例只需要对同 等长度的数据块进行 MAC帧数据检测, 而不需要根据不同类型业务的传输速率对不 同长度的数据分别进行 MAC帧数据检测。这样,通过一个 MAC帧数据检测通路就可 以检测具有不同数据传输速率的不同类型的业务的 MAC帧, 从而使得本发明实施例 在配置较低的硬件基础上就可以实现, 降低处理资源的开销, 而且既能够应用于多种 业务类型的 MAC帧并行高速地传输的情况,也能够处理单业务类型的 MAC帧低速传 输的情况, 并且能够处理多种业务类型的 MAC帧采用不同传输速率的情况, 因此, 具有很好的扩展性, 能够满足目前越来越高的数据传输速率要求和业务种类不断增加 的 MAC帧数据处理需求, 而且可应用于有以太网 MAC层处理要求的各种通信设备, 应用范围广泛。 本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程 图和 /或方框图来描述的。 应理解可由计算机程序指令实现流程图和 /或方框图中的 每一流程和 /或方框、 以及流程图和 /或方框图中的流程和 /或方框的结合。 可提供 这些计算机程序指令到通用计算机、 专用计算机、 嵌入式处理机或其他可编程数据处 理设备的处理器以产生一个机器, 使得通过计算机或其他可编程数据处理设备的处理 器执行的指令产生用于实现在流程图一个流程或多个流程和 /或方框图一个方框或多 个方框中指定的功能的装置。 这些计算机程序指令也可存储在能弓 I导计算机或其他可编程数据处理设备以特定 方式工作的计算机可读存储区域中, 使得存储在该计算机可读存储区域中的指令产生 包括指令装置的制造品, 该指令装置实现在流程图一个流程或多个流程和 /或方框图 一个方框或多个方框中指定的功能。 这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上, 使得在计 算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理, 从而在计算 机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和 /或 方框图一个方框或多个方框中指定的功能的步骤。 尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创 造性概念, 则可对这些实施例作出另外的变更和修改。 所以, 所附权利要求意欲解释 为包括优选实施例以及落入本发明范围的所有变更和修改。 显然, 本领域的技术人员可以对本发明实施例进行各种改动和变型而不脱离本发 明实施例的精神和范围。 这样, 倘若本发明实施例的这些修改和变型属于本发明权利 要求及其等同技术的范围之内, 则本发明也意图包含这些改动和变型在内。 The CRC is detected as: Performing a cyclic redundancy check on the data of the DA byte of the frame to the FCS byte to determine whether the frame has a CRC error. The frame type detection is: detecting the frame type byte and determining the type of the frame. Step 204: The receiving end has a complete detection result of the MAC frame in the storage area corresponding to the detected data block, and parses the corresponding MAC frame according to the complete detection result of the obtained MAC frame, and outputs the MAC frame. Complete test result output. For the complete MAC frame, the detection result in the storage address of the corresponding MAC frame data detection result is directly obtained, and the MAC frame is parsed and output, and is output as a complete detection result of the complete MAC frame. For a partial MAC frame, after the detection result of the current partial MAC frame is stored in the corresponding MAC frame data detection result storage address, the receiving end stores the detection result belonging to the same MAC frame in the same MAC frame data detection result storage address, Therefore, after the detection result of each partial MAC frame belonging to the same MAC frame is stored in the same MAC frame data detection result storage address, the same MAC frame is parsed according to the stored content in the MAC frame data detection result storage address. After outputting, the stored content in the MAC frame data detection result storage address is output as a complete detection result of the same MAC frame. In addition, the processing of the MAC frame in step 204 specifically includes: if the complete detection result of any one MAC frame indicates that the arbitrary one MAC frame passes multiple character detection, according to the complete detection result of the any one MAC frame and the user configuration Transparently transmitting, regenerating, or filtering any MAC frame; if the complete detection result of any one MAC frame indicates that the arbitrary one MAC frame does not pass at least one character detection, according to the complete detection result of the any one MAC frame and the user configuration modification or Discard at least one MAC frame. The specific operations of transparently transmitting, modifying, regenerating, filtering, capturing, or discarding the MAC frame are as follows: Transparent transmission means that the input data in the MAC frame is not changed, and is directly output; Modifying refers to changing certain fields of the MAC frame. The value is then output; the regeneration refers to regenerating the fields of the MAC frame to form a new MAC frame output; filtering refers to filtering out the MAC frame that meets the filtering condition according to the detection result of the source address, the destination address, the label, and the frame type. The detection result of the output source address, the destination address, the label, and the frame type has no error MAC frame; the acquisition refers to extracting the MAC frame conforming to the capture condition from the data stream and providing the user with the read according to the user configuration and the complete detection result. Discarding refers to discarding MAC frames that meet the discarding criteria based on user configuration and complete detection results, such as MAC frames containing errors. The following takes the data transmission rate of the Ethernet MAC layer input interface as 100 Gb/s as an example. It describes in detail how to record each data block in the slot frame according to the service distribution in the slot frame in the current system period. The detection result is stored in the corresponding storage area. If the current slot frame contains only one service with a data transmission rate of 100 Gb/s, the detection result of any one of the data blocks in the slot frame and the MAC frame parsed according to the complete detection result may be stored in any one of the slots. In the storage area. If the current slot frame contains a service with a data transmission rate of 40 G/s and a service with a data transmission rate of 10 G/s, the data transmission rate may be any data block corresponding to the service of 40 G/S. The detection result and the MAC frame parsed according to the complete detection result are stored in any one of the storage areas corresponding to the service type, and the detection result of the data block of the service with multiple data transmission rates of 10 G/s is analyzed according to the complete detection result. The subsequent MAC frames are respectively stored in the corresponding storage areas according to the corresponding service types. If the current slot frame includes multiple services with a data transmission rate of 10 Gb/s, the detection result of the time slot corresponding to the service with multiple data transmission rates of 10 G/s and the MAC frame parsed according to the complete detection result are The corresponding service types are respectively stored in the corresponding storage areas. After a time slot frame is processed, if there is a parsed MAC frame, all the parsed MAC frames can be combined into one data output, fed back to the transmitting end, and all the detected detection results are output for the user. Query the performance of the MAC frame transmitted here. Based on the foregoing technical solution, in an embodiment of the present invention, an Ethernet MAC frame data processing apparatus is configured as shown in FIG. 3, and includes: a receiving module 301, configured to receive MAC frames of different service types; and a reconstruction module 302, configured The MAC frames of each type of service received are respectively divided into a plurality of data blocks according to a preset length, wherein each data block includes a complete MAC frame or/and a partial MAC frame; and the detecting module 303 is in each system cycle. The MAC frame data is detected in the data block corresponding to the different service types according to the preset sequence, and the detection result is stored in the corresponding storage area; the parsing module 304 is set to exist in the storage area corresponding to the detected data block. The complete detection result of the MAC frame is obtained by parsing the corresponding MAC frame according to the complete detection result of the obtained MAC frame, and outputting the complete detection result of the MAC frame. In the device designed by the embodiment of the present invention, the storage area corresponding to each type of service may be a memory. Since the device designed by the embodiment of the present invention always performs MAC frame data detection processing on a data block having a preset length, if the service type or data transmission rate of the received MAC frame is changed, the device can still perform data processing on the MAC frame. Therefore, the device designed by the embodiment of the present invention can support MAC frame data processing of different transmission rates and different service types, and can support switching between services of different data transmission rates, thereby saving hardware resources and having a wide application range. Those skilled in the art can understand all or part of the steps in the foregoing embodiments by using an FPGA (Field-Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit). achieve. In summary, in the embodiment of the present invention, the receiving end divides the MAC frames of different types of services received in one system period into data blocks of the same size, and then differently according to a preset sequence in each system cycle. The data block corresponding to the service type performs the MAC frame data detection, so that the embodiment of the present invention only needs to perform MAC frame data detection on the data block of the same length, and does not need to separately perform MAC for different lengths of data according to the transmission rate of different types of services. Frame data detection. In this way, the MAC frame of the different types of services having different data transmission rates can be detected through a MAC frame data detection path, so that the embodiment of the present invention can be implemented on the basis of lower hardware configuration, and the processing resource overhead is reduced. Moreover, it can be applied to the case where MAC frames of multiple service types are transmitted in parallel at high speed, and can also handle the case of low-speed transmission of MAC frames of a single service type, and can handle different transmission rates of MAC frames of multiple service types. Therefore, it has good scalability, can meet the ever-increasing data transmission rate requirements and the ever-increasing MAC frame data processing requirements of the service category, and can be applied to various communication devices having Ethernet MAC layer processing requirements. A wide range of applications. The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart. The computer program instructions may also be stored in a computer readable storage area operable in a particular manner by a computer or other programmable data processing device such that instructions stored in the computer readable storage area are generated Included is an article of manufacture of an instruction device that implements the functions specified in a block or blocks of a flow or a flow and/or block diagram of the flowchart. These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram. Although the preferred embodiment of the invention has been described, it will be apparent to those skilled in the art that, Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and the modifications and It is apparent that those skilled in the art can make various modifications and variations to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. Thus, it is intended that the present invention cover the modifications and modifications of the embodiments of the invention.

Claims

权 利 要 求 书 、 一种以太网介质访问控制 MAC帧数据处理方法, 包括: Claims, an Ethernet medium access control MAC frame data processing method, including:
接收不同业务类型的 MAC帧;  Receiving MAC frames of different service types;
根据预设长度将接收到的每一种业务类型的 MAC帧分别划分成若干数据 块, 其中, 每个数据块内包含完整 MAC帧或 /和部分 MAC帧;  The received MAC frames of each service type are respectively divided into a plurality of data blocks according to a preset length, where each data block includes a complete MAC frame or/and a partial MAC frame;
在各个系统周期内, 按照预设的顺序对不同业务类型对应的数据块进行 MAC帧数据检测, 并将检测结果存入对应的存储区域。 、 如权利要求 1所述的方法, 其中, 所述根据预设长度将接收到的每一种业务类 型的 MAC帧分别划分成若干数据块, 包括: 根据输入接口的最大吞吐量和数据处理量确定所述预设长度;  During each system cycle, the MAC frame data is detected for the data blocks corresponding to different service types in a preset order, and the detection result is stored in the corresponding storage area. The method according to claim 1, wherein the dividing the received MAC frames of each service type into a plurality of data blocks according to a preset length, comprising: according to the maximum throughput and data processing amount of the input interface Determining the preset length;
根据所述预设长度将接收到的每一种业务类型的 MAC帧分别划分成若干 数据块。 、 如权利要求 1所述的方法, 其中, 在任意一个系统周期内, 按照预设的顺序对 不同业务类型对应的数据块进行 MAC帧数据检测, 包括:  The received MAC frames of each service type are respectively divided into a plurality of data blocks according to the preset length. The method according to claim 1, wherein, in any one of the system cycles, MAC frame data detection is performed on data blocks corresponding to different service types according to a preset sequence, including:
根据每一种业务类型的 MAC帧在所述任意一个系统周期内的数据传输量 所占的最大吞吐量权重, 分别确定所述任意一个系统周期内需要进行 MAC帧 数据检测的每一种业务类型的数据块的数目和检测顺序;  Determining, according to the maximum throughput weight of the data transmission amount of the MAC frame of each service type in any one of the system periods, respectively, determining each service type that needs to perform MAC frame data detection in any one of the system periods. Number of data blocks and detection order;
根据确定的数据块的检测顺序依次对所述任意一个系统周期内需要解析的 数据块进行 MAC帧数据检测。 、 如权利要求 3所述的方法, 其中, 针对任意一个数据块进行 MAC帧数据检测, 并将检测结果存入对应的存储区域, 包括:  The MAC frame data detection is performed on the data blocks that need to be parsed in any one of the system cycles in sequence according to the determined detection order of the data blocks. The method of claim 3, wherein the MAC frame data detection is performed on any one of the data blocks, and the detection result is stored in the corresponding storage area, including:
通过对所述任意一个数据块进行 MAC帧的开始控制字和结束控制字的查 找, 从中提取出完整 MAC帧或 /和部分 MAC帧;  Extracting a complete MAC frame or/and a partial MAC frame from the start control word and the end control word of the MAC frame for any one of the data blocks;
若从所述当前数据块中提取出一个完整 MAC帧或者一个部分 MAC帧, 则对所述一个完整 MAC帧或者一个部分 MAC帧进行多项字符检测, 并根据 所述当前数据块的业务类型将检测结果存入对应的存储区域; 若从所述当前数据块中提取出多个完整 MAC帧或多个部分 MAC帧, 或 者, 从所述当前数据块中提取出至少一个的完整 MAC 帧和至少一个的部分 MAC帧,则分别对提取出的每一个完整 MAC帧或 /和部分 MAC帧进行多项字 符检测, 并根据所述当前数据块的业务类型将每一个完整 MAC 帧或 /和部分 MAC帧的检测结果分别存入各自对应的存储区域; If a complete MAC frame or a partial MAC frame is extracted from the current data block, performing multiple character detection on the one complete MAC frame or one partial MAC frame, and according to the service type of the current data block The detection result is stored in the corresponding storage area; If a plurality of complete MAC frames or a plurality of partial MAC frames are extracted from the current data block, or at least one complete MAC frame and at least one partial MAC frame are extracted from the current data block, respectively Extracting each complete MAC frame or/and part of the MAC frame for multiple character detection, and storing the detection results of each complete MAC frame or/and part of the MAC frame respectively according to the service type of the current data block Storage area;
其中, 将完整 MAC帧的检测结果存入对应的 MAC帧数据检测结果存储 地址中, 作为所述完整 MAC帧的完整检测结果, 将属于同一 MAC帧的各个 部分 MAC帧的检测结果存入同一 MAC帧数据检测结果存储地址中, 作为所 述同一 MAC帧的完整检测结果。 、 如权利要求 4所述的方法, 其中, 对完整 MAC帧或 /和部分 MAC帧进行多项 字符检测, 包括- 对完整 MAC帧或 /和部分 MAC帧进行帧间隔检测、 前导码检测、 源地址 检测、 目的地址检测、标签检测、循环冗余校验码 CRC检测、 帧类型检测和帧 长检测。 、 权利要求 4或 5所述的方法, 其中, 将检测完毕的数据块的检测结果存入对应 的存储区域之后, 还包括:  The detection result of the complete MAC frame is stored in the corresponding MAC frame data detection result storage address, and the detection result of each part of the MAC frame belonging to the same MAC frame is stored in the same MAC as the complete detection result of the complete MAC frame. The frame data detection result storage address is a complete detection result of the same MAC frame. The method according to claim 4, wherein performing multiple character detection on the complete MAC frame or/and part of the MAC frame, including - performing frame interval detection on the complete MAC frame or/and part of the MAC frame, preamble detection, source Address detection, destination address detection, tag detection, cyclic redundancy check code CRC detection, frame type detection, and frame length detection. The method of claim 4 or 5, wherein after the detection result of the detected data block is stored in the corresponding storage area, the method further includes:
若所述检测完毕的数据块对应的存储区域内存在 MAC 帧的完整检测结 果, 根据获得的 MAC帧的完整检测结果对相应的 MAC帧进行解析处里后输 出, 并将所述 MAC帧的完整检测结果输出。 、 权利要求 6所述的方法, 其中, 根据获得的 MAC帧的完整检测结果对相应的 MAC帧进行解析处理, 具体包括:  If the complete detection result of the MAC frame exists in the storage area corresponding to the detected data block, the corresponding MAC frame is parsed and output according to the complete detection result of the obtained MAC frame, and the MAC frame is complete. Test result output. The method of claim 6, wherein the parsing processing of the corresponding MAC frame according to the complete detection result of the obtained MAC frame comprises:
若任意一个 MAC帧的完整检测结果表明所述任意一个 MAC帧通过了多 项字符检测,则根据所述任意一个 MAC帧的完整检测结果以及用户配置透传、 再生或过滤所述任意一个 MAC帧;  If the complete detection result of any one MAC frame indicates that the any one MAC frame passes the multiple character detection, the any one MAC frame is transparently transmitted, regenerated, or filtered according to the complete detection result of the any one MAC frame and the user configuration. ;
若任意一个 MAC帧的完整检测结果表明所述任意一个 MAC帧未通过至 少一项字符检测, 则根据所述任意一个 MAC帧的完整检测结果以及用户配置 修改或丢弃所述至少一个 MAC帧。 、 一种以太网介质访问控制 MAC帧数据处理装置, 包括:  If the complete detection result of any one of the MAC frames indicates that the arbitrary one of the MAC frames does not pass at least one character detection, the at least one MAC frame is modified or discarded according to the complete detection result of the any one of the MAC frames and the user configuration. , an Ethernet medium access control MAC frame data processing device, comprising:
接收模块, 设置为接收不同业务类型的 MAC帧; 重构模块, 设置为根据预设长度将接收到的每一种业务类型的 MAC帧分 别划分成若干数据块, 其中, 每个数据块内包含完整 MAC帧或 /和部分 MAC 帧; a receiving module, configured to receive MAC frames of different service types; The reconstruction module is configured to divide the received MAC frames of each service type into a plurality of data blocks according to a preset length, where each data block includes a complete MAC frame or/and a partial MAC frame;
检测模块, 设置为在各个系统周期内, 按照预设的顺序对不同业务类型对 应的数据块进行 MAC帧数据检测, 并将检测结果存入对应的存储区域。 、 如权利要求 8所述的装置, 其中, 所述重构模块还设置为, 根据输入接口的最大吞吐量和数据处理量确定所述预设长度; 根据所述预设长度将接收到的每一种业务类型的 MAC帧分别划分成若干 数据块。 、 如权利要求 9所述的装置, 其中, 所述检测模块还设置为,  The detecting module is configured to perform MAC frame data detection on the data blocks corresponding to different service types in a preset sequence in each system cycle, and store the detection result in the corresponding storage area. The apparatus according to claim 8, wherein the reconstruction module is further configured to: determine the preset length according to a maximum throughput of the input interface and a data processing amount; and each received according to the preset length A MAC frame of a service type is divided into a plurality of data blocks, respectively. The device of claim 9, wherein the detecting module is further configured to
根据每一种业务类型的 MAC帧在所述任意一个系统周期内的数据传输量 所占的最大吞吐量权重, 分别确定所述任意一个系统周期内需要进行 MAC帧 数据检测的每一种业务类型的数据块的数目和检测顺序;  Determining, according to the maximum throughput weight of the data transmission amount of the MAC frame of each service type in any one of the system periods, respectively, determining each service type that needs to perform MAC frame data detection in any one of the system periods. Number of data blocks and detection order;
根据确定的数据块的检测顺序依次对所述任意一个系统周期内需要解析的 数据块进行 MAC帧数据检测。 1、 如权利要求 10所述的装置, 其中, 所述检测模块进一步设置为,  The MAC frame data detection is performed on the data blocks that need to be parsed in any one of the system cycles in sequence according to the determined detection order of the data blocks. The device according to claim 10, wherein the detecting module is further configured to
通过对所述任意一个数据块进行 MAC帧的开始控制字和结束控制字的查 找, 从中提取出完整 MAC帧或 /和部分 MAC帧;  Extracting a complete MAC frame or/and a partial MAC frame from the start control word and the end control word of the MAC frame for any one of the data blocks;
若从所述当前数据块中提取出一个完整 MAC帧或者一个部分 MAC帧, 则对所述一个完整 MAC帧或者一个部分 MAC帧进行多项字符检测, 并根据 所述当前数据块的业务类型将检测结果存入对应的存储区域;  If a complete MAC frame or a partial MAC frame is extracted from the current data block, performing multiple character detection on the one complete MAC frame or one partial MAC frame, and according to the service type of the current data block The detection result is stored in the corresponding storage area;
若从所述当前数据块中提取出多个完整 MAC帧或多个部分 MAC帧, 或 者, 从所述当前数据块中提取出至少一个的完整 MAC 帧和至少一个的部分 MAC帧,则分别对提取出的每一个完整 MAC帧或 /和部分 MAC帧进行多项字 符检测, 并根据所述当前数据块的业务类型将每一个完整 MAC 帧或 /和部分 MAC帧的检测结果分别存入各自对应的存储区域;  If a plurality of complete MAC frames or a plurality of partial MAC frames are extracted from the current data block, or at least one complete MAC frame and at least one partial MAC frame are extracted from the current data block, respectively Extracting each complete MAC frame or/and part of the MAC frame for multiple character detection, and storing the detection results of each complete MAC frame or/and part of the MAC frame respectively according to the service type of the current data block Storage area;
其中, 将完整 MAC帧的检测结果存入对应的 MAC帧数据检测结果存储 地址中, 作为所述完整 MAC帧的完整检测结果, 将属于同一 MAC帧的各个 部分 MAC帧的检测结果存入同一 MAC帧数据检测结果存储地址中, 作为所 述同一 MAC帧的完整检测结果。 、 如权利要求 11所述的装置, 其中, 所述多项字符检测, 包括: 帧间隔检测、 前导码检测、 源地址检测、 目的地址检测、 标签检测、 循环 冗余校验码 CRC检测、 帧类型检测和帧长检测。 、 如权利要求 11或 12所述的装置, 其中, 还包括解析模块, 设置为: The detection result of the complete MAC frame is stored in the corresponding MAC frame data detection result storage address, and the detection result of each part of the MAC frame belonging to the same MAC frame is stored in the same MAC as the complete detection result of the complete MAC frame. The frame data detection result storage address is a complete detection result of the same MAC frame. The apparatus according to claim 11, wherein the plurality of character detections include: frame interval detection, preamble detection, source address detection, destination address detection, tag detection, cyclic redundancy check code CRC detection, and frame Type detection and frame length detection. The device according to claim 11 or 12, further comprising a parsing module, configured to:
若所述检测完毕的数据块对应的存储区域内存在 MAC 帧的完整检测结 果, 根据获得的 MAC帧的完整检测结果对相应的 MAC帧进行解析处里后输 出, 并将所述 MAC帧的完整检测结果输出。 、 如权利要求 13所述的装置, 其中, 所述解析模块还设置为,  If the complete detection result of the MAC frame exists in the storage area corresponding to the detected data block, the corresponding MAC frame is parsed and output according to the complete detection result of the obtained MAC frame, and the MAC frame is complete. Test result output. The device of claim 13, wherein the parsing module is further configured to:
若任意一个 MAC帧的完整检测结果表明所述任意一个 MAC帧通过了多 项字符检测,则根据所述任意一个 MAC帧的完整检测结果以及用户配置透传、 或再生所述任意一个 MAC帧;  If the complete detection result of any one of the MAC frames indicates that the any one of the MAC frames passes the multiple character detection, the any one MAC frame is transparently transmitted or regenerated according to the complete detection result of the any one of the MAC frames and the user configuration;
若任意一个 MAC帧的完整检测结果表明所述任意一个 MAC帧未通过至 少一项字符检测, 则根据所述任意一个 MAC帧的完整检测结果以及用户配置 修改、 过滤或丢弃所述至少一个 MAC帧。  If the complete detection result of any one of the MAC frames indicates that the any one of the MAC frames is not detected by at least one character, the at least one MAC frame is modified, filtered, or discarded according to the complete detection result of the any one of the MAC frames and the user configuration. .
PCT/CN2013/082491 2012-10-16 2013-08-28 Method and device for processing mac frame data of ethernet WO2014059829A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210392271.7 2012-10-16
CN201210392271.7A CN103731360B (en) 2012-10-16 2012-10-16 A kind of ethernet mac frame data processing method and processing device

Publications (1)

Publication Number Publication Date
WO2014059829A1 true WO2014059829A1 (en) 2014-04-24

Family

ID=50455294

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/082491 WO2014059829A1 (en) 2012-10-16 2013-08-28 Method and device for processing mac frame data of ethernet

Country Status (2)

Country Link
CN (1) CN103731360B (en)
WO (1) WO2014059829A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109818811B (en) * 2019-03-25 2020-05-12 电子科技大学 Method for identifying distribution type and mixed type MAC protocol
CN113194046B (en) * 2021-04-14 2023-04-14 深圳赛动智造科技有限公司 Method, device and equipment for acquiring monitoring data in real time

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101087245A (en) * 2006-06-08 2007-12-12 大唐移动通信设备有限公司 Method for simultaneously transmitting multiple types of data in mobile communication system
WO2009061260A1 (en) * 2007-11-06 2009-05-14 Telefonaktiebolaget L M Ericsson (Publ) Method and arrangement in a wireless communications system
CN102428726A (en) * 2009-05-08 2012-04-25 索尼公司 Communication device, communication method, and communication system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7508809B2 (en) * 2003-05-16 2009-03-24 Mitsubishi Electric Corporation Base station and radio terminal
CN101192900B (en) * 2006-12-01 2011-05-11 武汉烽火网络有限责任公司 Communication method and device for application forward error correction mechanism of carrier-class Ethernet

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101087245A (en) * 2006-06-08 2007-12-12 大唐移动通信设备有限公司 Method for simultaneously transmitting multiple types of data in mobile communication system
WO2009061260A1 (en) * 2007-11-06 2009-05-14 Telefonaktiebolaget L M Ericsson (Publ) Method and arrangement in a wireless communications system
CN102428726A (en) * 2009-05-08 2012-04-25 索尼公司 Communication device, communication method, and communication system

Also Published As

Publication number Publication date
CN103731360A (en) 2014-04-16
CN103731360B (en) 2017-09-12

Similar Documents

Publication Publication Date Title
US11296807B2 (en) Techniques to operate a time division multiplexing(TDM) media access control (MAC)
JP6831927B2 (en) Link group configuration method and device
JP7122455B2 (en) Traffic transmission method, apparatus and computer storage medium
US10341230B2 (en) Techniques for forwarding or receiving data segments associated with a large data packet
US10778588B1 (en) Load balancing for multipath groups routed flows by re-associating routes to multipath groups
US20130262703A1 (en) System and method for reducing netflow traffic in a network environment
JP2007266759A (en) Network processing apparatus, multiprocessor system, and network protocol processing method
US10819640B1 (en) Congestion avoidance in multipath routed flows using virtual output queue statistics
US20240283743A1 (en) Deterministic data transmission device and method for compatibility network
KR102452615B1 (en) Method for transmitting data based on priority in network
US20120250700A1 (en) Method, apparatus, and system for data transmission
AU2017437863A1 (en) Clock synchronization method and apparatus
CN106717111A (en) Method, device, and system for receiving CPRI data stream and ethernet frame
US20030118022A1 (en) Reconfigurable data packet header processor
JP5573955B2 (en) Frame connecting device
CN112751788A (en) Double-plane switching method supporting multi-type frame mixed transmission
JP2005012381A (en) Device and method for transferring data, data communication system using the same and program
JP2018107584A (en) Network device and control method of the same
CN115695553A (en) Data transmission system and method for synchronous surface and management surface between FPGA chips
WO2014059829A1 (en) Method and device for processing mac frame data of ethernet
CN105763375B (en) A kind of data packet sending method, method of reseptance and microwave station
CN103312577B (en) A kind of method and device of processing MAC data
CN113364737A (en) Method and apparatus for transmitting data in flexible Ethernet
WO2018090611A1 (en) Packet processing method and device, and computer storage medium
CN115695576B (en) Data frame conversion method and device compatible with TSN frame preemption protocol

Legal Events

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

Ref document number: 13846477

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13846477

Country of ref document: EP

Kind code of ref document: A1