KR20150041460A - Packet parsing processor, system and method thereof - Google Patents

Packet parsing processor, system and method thereof Download PDF

Info

Publication number
KR20150041460A
KR20150041460A KR20130120007A KR20130120007A KR20150041460A KR 20150041460 A KR20150041460 A KR 20150041460A KR 20130120007 A KR20130120007 A KR 20130120007A KR 20130120007 A KR20130120007 A KR 20130120007A KR 20150041460 A KR20150041460 A KR 20150041460A
Authority
KR
South Korea
Prior art keywords
packet
code
parsing
packet parsing
engine
Prior art date
Application number
KR20130120007A
Other languages
Korean (ko)
Other versions
KR101553399B1 (en
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 (주) 시스메이트
Priority to KR1020130120007A priority Critical patent/KR101553399B1/en
Publication of KR20150041460A publication Critical patent/KR20150041460A/en
Application granted granted Critical
Publication of KR101553399B1 publication Critical patent/KR101553399B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30145Instruction analysis, e.g. decoding, instruction word fields
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

Disclosed are a packet parsing processor, a system, and a method thereof. According to an embodiment of the present invention, the packet parsing processor includes at least one hardware based packet parsing engine for reading code created based on software for packet parsing and parsing packets inputted through a packet buffer using the read code.

Description

패킷 파싱 프로세서와 시스템 및 그 방법 {Packet parsing processor, system and method thereof}[0001] The present invention relates to a packet parsing processor,

본 발명은 패킷 처리기술에 관한 것으로, 보다 상세하게는 패킷을 분석하여 분류하는 패킷 파싱 기술에 관한 것이다.The present invention relates to a packet processing technique, and more particularly, to a packet parsing technique for analyzing and classifying packets.

네트워크를 통한 침입 등에 대응하기 위해서 데이터를 분석하기 위한 다양한 시스템들이 개발되고 있다. 그러나, 기가비트 이더넷 환경과 같은 네트워크의 고속화 및 이를 바탕으로 한 대용량 데이터의 송수신은 기존의 저속 보안 분석기법에 대해 변화를 요구하고 있다.Various systems for analyzing data in order to cope with intrusion through a network have been developed. However, the speed up of networks such as Gigabit Ethernet environment and the transmission and reception of large amount of data based on them are requiring changes to existing low-speed security analysis techniques.

즉, 갈수록 고속화되고 대용량화하는 네트워크 환경과 보다 다양해지는 침입 시도 등에 적절히 대응하기 위해서는, 보다 신속한 시간 내에 많은 데이터를 분석할 수 있는 기법이 요구된다.In other words, in order to cope with increasingly high-speed and large-capacity network environment and a variety of intrusion attempts, a technique capable of analyzing a large amount of data in a faster time is required.

일반적으로 컴퓨터에서 소프트웨어 기반으로 패킷을 파싱할 수 있다. 이 경우, 분석규칙 변경 시 쉽게 적용 가능할 수 있으나, 파싱 처리 속도가 늦어지는 문제가 있다. 근래 기업과 기관은 대부분 수 Gbps 급으로 인터넷 망을 구축하여 사용하고 있는데, 이 경우 그 처리속도는 더 늦어지게 된다.Generally, a computer can parse packets based on software. In this case, although it can be easily applied when changing analysis rules, there is a problem that the speed of parsing is slowed down. In recent years, most companies and institutions have used Internet networks with several Gbps, and in this case, the processing speed becomes slower.

일 실시 예에 따라, 하드웨어 기반의 패킷 파싱 프로세서를 통해 고속으로 대용량의 패킷 파싱이 가능하며, 패킷 파싱을 위해 필요한 코드는 소프트웨어 기반으로 생성하고 패킷 파싱 프로세서가 이를 이용함에 따라 분석규칙 변경에 유연하게 대처할 수 있는 패킷 파싱 프로세서와 시스템 및 그 방법을 제안한다.According to an exemplary embodiment, a hardware-based packet parsing processor enables high-speed and large-capacity packet parsing. The code necessary for packet parsing is generated on a software basis. The packet parsing processor is flexible in changing analysis rules We propose a packet parsing processor and system that can cope with this problem.

일 실시 예에 따른 패킷 파싱 프로세서는, 패킷이 입력되어 저장되는 패킷 버퍼와, 패킷 파싱을 위해 소프트웨어 기반으로 생성된 코드를 읽어들이고, 읽어들인 코드를 이용하여 패킷 버퍼를 통해 입력되는 패킷을 파싱하는 하드웨어 기반의 적어도 하나의 패킷 파싱 엔진을 포함한다.A packet parsing processor according to an embodiment includes a packet buffer in which a packet is input and stored, a code generator for reading the code generated by software for packet parsing, and parsing a packet input through the packet buffer using the read code And at least one packet parsing engine based on hardware.

다른 실시 예에 따른 패킷 파싱 시스템은, 패킷 파싱을 위해 필요한 코드를 생성하여 제공하는 소프트웨어 기반의 코드 제공부와, 코드 제공부에서 제공하는 코드를 저장하는 메모리와, 메모리로부터 코드를 읽어들이고, 읽어들인 코드를 이용하여 입력 패킷을 파싱하는 하드웨어 기반의 적어도 하나의 패킷 파싱 엔진을 포함한다.According to another embodiment of the present invention, there is provided a packet parsing system comprising: a software-based code providing unit for generating and providing a code necessary for packet parsing; a memory for storing a code provided by the code providing unit; Based at least one packet parsing engine that parses the input packet using the received code.

또 다른 실시 예에 따른 하드웨어 기반의 패킷 파싱 엔진의 패킷 파싱 방법은, 패킷 버퍼에 패킷이 있는지 검사하여 패킷이 있으면 해당 패킷을 파싱하기 위해 소프트웨어 기반으로 생성된 코드를 메모리로부터 읽어들이는 단계와, 읽어들인 코드를 디코딩하는 단계와, 디코딩된 코드를 실행하여 입력 패킷을 파싱하는 단계를 포함한다.According to another embodiment of the present invention, there is provided a packet parsing method of a hardware-based packet parsing engine, comprising the steps of: reading from a memory a code generated by a software for parsing a packet if the packet exists, Decoding the read code, and parsing the input packet by executing the decoded code.

일 실시 예에 따르면, 패킷 분석을 위해서 하드웨어적인 장점과 소프트웨어적인 장점을 모두 활용하여 하드웨어의 장점인 고속 처리와 소프트웨어의 장점인 분석규칙 변경에 따른 유연함을 모두 갖을 수 있다.According to an exemplary embodiment, both the hardware advantages and the software advantages can be utilized for packet analysis, and both the high-speed processing, which is an advantage of the hardware, and the flexibility according to the analysis rule change, which is an advantage of the software, can be obtained.

도 1은 본 발명의 일 실시 예에 따른 패킷 파싱 시스템을 도시한 구성도,
도 2는 본 발명의 일 실시 예에 따른 도 1의 패킷 파싱 프로세서의 세부 구성도,
도 3a 및 도 3b는 본 발명의 일 실시 예에 따른 도 2의 패킷 파싱 엔진의 세부 구성도,
도 4는 본 발명의 일 실시 예에 따른 패킷 파싱을 위해 필요한 명령어를 도시한 참조도,
도 5a 내지 도 5d는 본 발명의 일 실시 예에 따른 패킷 파싱에 의한 패킷을 분류하기 위해 사용되는 명령어의 예를 도시한 참조도,
도 6은 본 발명의 일 실시 예에 따른 패킷 파싱 엔진의 패킷 파싱 방법을 도시한 흐름도이다.
1 is a configuration diagram illustrating a packet parsing system according to an embodiment of the present invention;
FIG. 2 is a detailed configuration diagram of the packet parsing processor of FIG. 1 according to an embodiment of the present invention;
FIG. 3A and FIG. 3B are detailed configurations of the packet parsing engine of FIG. 2 according to an embodiment of the present invention;
FIG. 4 is a reference diagram showing the commands necessary for packet parsing according to an embodiment of the present invention;
5A to 5D are views illustrating an example of a command used for classifying packets by packet parsing according to an embodiment of the present invention;
6 is a flowchart illustrating a packet parsing method of a packet parsing engine according to an embodiment of the present invention.

이하에서는 첨부한 도면을 참조하여 본 발명의 실시 예들을 상세히 설명한다. 본 발명을 설명함에 있어 관련된 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략할 것이다. 또한, 후술되는 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서 이는 사용자, 운용자의 의도 또는 관례 등에 따라 달라질 수 있다. 그러므로 그 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present invention rather unclear. In addition, the terms described below are defined in consideration of the functions of the present invention, which may vary depending on the intention of the user, the operator, or the custom. Therefore, the definition should be based on the contents throughout this specification.

도 1은 본 발명의 일 실시 예에 따른 패킷 파싱 시스템을 도시한 구성도이다.1 is a block diagram illustrating a packet parsing system according to an embodiment of the present invention.

도 1을 참조하면, 패킷 파싱 시스템은 소프트웨어 기반의 코드 제공부(1)와 하드웨어 기반의 패킷 파싱 프로세서(Packet Parsing Processor: PPP)(2)를 포함한다. 코드 제공부(1)는 코드 생성기(Code generator)(10), 코드 선 컴파일러(Code Pre-compiler)(12) 및 컴파일러(Compiler)(14)를 포함하며, 패킷 파싱 프로세서(2)는 패킷 파싱 엔진(Packet Parsing Engine: PPE)(20)을 포함한다.Referring to FIG. 1, the packet parsing system includes a software-based code providing unit 1 and a hardware-based packet parsing processor (PPP) 2. The code providing unit 1 includes a code generator 10, a code pre-compiler 12 and a compiler 14. The packet parsing processor 2 performs packet parsing Engine (Packet Parsing Engine: PPE) 20.

코드 제공부(1)는 패킷 파싱 엔진(20)의 패킷 파싱을 위해 필요한 코드를 소프트웨어 기반으로 생성하여 제공한다. 생성된 코드는 메모리에 저장될 수 있다. 패킷 파싱 엔진(20)은 코드를 읽어들이고, 읽어들인 코드를 이용하여 입력 패킷의 헤더(header)를 파싱하여 어떤 패킷인지를 알아내고 패킷을 분류한다.The code providing unit 1 generates and provides codes necessary for packet parsing of the packet parsing engine 20 based on software. The generated code can be stored in memory. The packet parsing engine 20 reads the code, parses the header of the input packet using the read code, finds out which packet is the packet, and classifies the packet.

일 실시 예에 따른 코드 제공부(1)는 소프트웨어적으로 쉽게 코드를 변경할 수 있다. 즉, 코드가 고정된 분석규칙을 갖는 것이 아니라 쉽게 변경 가능한 분석규칙을 갖을 수 있다. 이 경우, 코드 제공부(1)는 패킷 파싱 엔진(20)의 유연한 패킷 파싱을 위해서, 변경된 코드를 패킷 파싱 엔진(20)에 제공한다. 일 실시 예에 따른 패킷 파싱 엔진(20)은 변경된 코드를 읽어들임에 따라, 패킷 파싱 엔진(20)의 구성은 변경하지 않고 그대로 둔 채 변경된 코드를 이용하여 패킷을 파싱할 수 있다. 따라서, 코드를 소프트웨어적으로 변경하여 업데이트하고, 패킷 파싱 엔진(20)은 업데이트된 코드를 읽어들이기만 하면 그에 맞는 패킷 파싱을 고속 및 대량으로 수행할 수 있게 된다.The code providing unit 1 according to the embodiment can easily change the code in software. That is, the code can have an easily changeable analysis rule rather than having a fixed analysis rule. In this case, the code providing unit 1 provides the modified code to the packet parsing engine 20 for flexible packet parsing of the packet parsing engine 20. As the packet parsing engine 20 according to the embodiment reads the changed code, the packet parsing engine 20 can keep the configuration of the packet parsing engine 20 unchanged and can parse the packet using the changed code. Therefore, the code is changed by software and updated, and the packet parsing engine 20 can perform packet parsing at high speed and in large quantities by reading the updated code.

세부적으로, 코드 제공부(1)의 코드 생성기(10)는 패킷 파싱 엔진(20)의 패킷 파싱을 위한 코드를 생성한다. 코드 선 컴파일러(12)는 코드 생성기(10)에 의해 생성된 코드를 패킷 파싱 프로세서(2)가 사용 가능한 환경에 맞추어 변경한다. 즉, 패킷 파싱 프로세서(2)의 패킷 버퍼, 레지스터 등의 하드웨어 리소스 제약에 따라 코드 구성을 변경한다. 컴파일러(14)는 코드 선 컴파일러(12)에 의해 변경된 코드를 명령코드(op-code)와 오퍼랜드(operand)로 조합된 명령어로 변환한다. 변환된 명령어는 메모리에 저장될 수 있는데, 패킷 파싱 엔진(20)은 메모리에 저장된 명령어를 이용하여 입력 패킷을 분석할 수 있다. 명령어는 예를 들어 패킷 분석을 위해 필요한 산술 연산, 논리 연산, 이송, 건너뛰기, 입출력 등에 대한 명령 등을 포함한다.In detail, the code generator 10 of the code providing unit 1 generates a code for packet parsing of the packet parsing engine 20. The code line compiler 12 changes the code generated by the code generator 10 to match the environment in which the packet parsing processor 2 is available. That is, the code configuration is changed in accordance with hardware resource constraints such as packet buffers and registers of the packet parsing processor 2. The compiler 14 converts the code changed by the code line compiler 12 into a command combined with the command code op-code and the operand. The translated instruction may be stored in a memory, which may analyze the input packet using instructions stored in memory. The instructions include, for example, instructions for arithmetic operations, logical operations, traversing, skipping, input / output, etc. necessary for packet analysis.

패킷 파싱 프로세서(2)는 패킷 파싱을 위한 전용 프로세서로서, FPGA(field-programmable gate array) 등으로 구현될 수 있다. 소프트웨어적인 패킷 파싱 방식이 CPU가 메모리를 이용하여 수행됨에 비하여, 본 발명에 따른 패킷 파싱 방식은 FPGA와 같은 전용 프로세서인 패킷 파싱 프로세서(2)에서 수행됨에 따라 고속의 패킷 처리가 가능하다.The packet parsing processor 2 is a dedicated processor for packet parsing and may be implemented as a field-programmable gate array (FPGA). The packet parsing method according to the present invention is performed by the packet parsing processor 2, which is a dedicated processor such as an FPGA, so that high-speed packet processing is possible.

전술한 바에 의하면, 패킷 분석을 위해서 하드웨어적인 장점과 소프트웨어적인 장점을 모두 활용하여 하드웨어의 장점인 고속 처리와 소프트웨어의 장점인 분석규칙 변경에 따른 유연함을 모두 갖을 수 있다. 즉, 패킷 파싱 엔진(20)은 하드웨어 방식으로 패킷을 파싱함에 따라 소프트웨어 방식에 비해 빠른 처리 속도를 가질 수 있다. 나아가, 코드 제공부(1)를 통해 소프트웨어적으로 쉽게 코드를 변경할 수 있음에 따라, 패킷 파싱 엔진(20)이 변경된 코드를 읽어들여 패킷 파싱을 수행하여 하드웨어의 유연성 결여에 대한 단점을 보완할 수 있다.As described above, both of the hardware advantages and the software advantages are utilized for packet analysis, and both of the high-speed processing advantages of the hardware and the flexibility of the analysis rule changes, which are advantages of the software, can be obtained. That is, the packet parsing engine 20 can have a faster processing speed than a software method by parsing packets in a hardware manner. Further, since the code can easily be changed in software through the code providing unit 1, the packet parsing engine 20 reads the changed code and performs packet parsing to compensate for the shortcomings of the lack of hardware flexibility have.

도 2는 본 발명의 일 실시 예에 따른 도 1의 패킷 파싱 프로세서(2)의 세부 구성도이다.2 is a detailed configuration diagram of the packet parsing processor 2 of FIG. 1 according to an embodiment of the present invention.

도 2를 참조하면, 패킷 파싱 프로세서(2)는 패킷 파싱 엔진(20), 패킷 버퍼(22) 및 제어 레지스터(24)를 포함한다.2, the packet parsing processor 2 includes a packet parsing engine 20, a packet buffer 22, and a control register 24.

패킷 버퍼(22)에는 입력 패킷이 임시적으로 저장된다. 패킷 파싱 엔진(20)은 패킷 파싱을 위해 필요한 코드를 메모리로부터 읽어들이고, 읽어들인 코드를 이용하여 패킷 버퍼(22)를 통해 입력되는 패킷을 파싱한다.In the packet buffer 22, an input packet is temporarily stored. The packet parsing engine 20 reads the code necessary for packet parsing from the memory and parses the packet input through the packet buffer 22 using the read code.

패킷 파싱 엔진(20)은 도 2에 도시된 바와 같이 다수 개가 그룹(group) 형태로 구성될 수 있다. 그룹 내의 각 패킷 파싱 엔진(20-1,20-2,…,20-n)은 블록 메모리 내 명령어와 제어 레지스터 파일(24)을 공유할 수 있다. 각 패킷 파싱 엔진(20-1,20-2,…,20-n)은 각각 대상이 되는 패킷 버퍼(22)의 입력 패킷을 대상으로 동시에 병렬 처리하여 처리 속도를 향상시킬 수 있다.The packet parsing engine 20 may be configured in a plurality of groups as shown in FIG. Each packet parsing engine 20-1, 20-2, ..., 20-n in the group may share control register file 24 with instructions in the block memory. Each of the packet parsing engines 20-1, 20-2, ..., and 20-n can parallelly process input packets of a packet buffer 22 to be processed, thereby improving the processing speed.

패킷 파싱 엔진(20)은 패킷 버퍼(22)로부터 입력되는 패킷을 파싱하기 위해 메모리에서 파싱 코드를 읽어 들인다. 파싱 코드는 도 1의 코드 제공부(1)에서 생성된다. 패킷 파싱 엔진(20)은 읽어들인 파싱 코드를 보고 패킷을 파싱하여 해당 패킷이 어떤 패킷인지를 알아낸다. 예를 들어, 해당 패킷이 VLAN-IPV6-TCP 패킷인지 여부를 알아낼 수 있다.The packet parsing engine 20 reads the parsing code from the memory to parse the packet input from the packet buffer 22. The parsing code is generated in the code providing unit 1 of Fig. The packet parsing engine 20 parses the packet by looking up the parsing code read, and finds out what packet the packet is. For example, it can be determined whether the packet is a VLAN-IPV6-TCP packet.

패킷 파싱 엔진(20)은 도 1에 도시된 바와 같이 레지스터들(registers)과 의사 RISC(Pseudo reduced instruction set computer) 등으로 구성될 수 있다. RISC는 명령어를 최소로 줄여 단순하게 만들어 분석 속도가 빠르고 여러 개의 명령어를 처리하기에 적합하다.The packet parsing engine 20 may include registers and pseudo reduced instruction set computer (RISC) as shown in FIG. RISC simplifies commands by minimizing them to a minimum, making analysis fast and suitable for processing multiple instructions.

도 3a 및 도 3b는 본 발명의 일 실시 예에 따른 도 2의 패킷 파싱 엔진(20)의 세부 구성도이다.FIGS. 3A and 3B are detailed configuration diagrams of the packet parsing engine 20 of FIG. 2 according to an embodiment of the present invention.

도 3a 및 도 3b를 참조하면, 패킷 파싱 엔진(20)은 패치부(Instruction Fetch Unit)(210), 디코딩부(Instruction Decoding Unit)(220), 실행부(Execute Unit)(230), 메모리 액세스부(Memory Access Unit)(240) 및 라이트 백부(Write Back Unit)(250)의 다섯 개의 스테이지(stage)로 이루어진 파이프라인(pipeline)으로 구성된다.3A and 3B, the packet parsing engine 20 includes an instruction fetch unit 210, an instruction decoding unit 220, an execution unit 230, a memory access A memory access unit 240 and a write back unit 250. The pipeline is composed of five stages.

패치부(210)는 패킷 버퍼(22)에 패킷이 있는지 검사하여 패킷이 있으면 해당 패킷을 파싱하기 위해 메모리, 예를 들어 도 3b의 파싱 맵(26)으로부터 명령어를 읽어들인다. 메모리에 저장된 명령어는 소프트웨어적으로 쉽게 변경 가능하며, 명령어가 변경된 경우 패킷 파싱 엔진(20)의 구성은 그대로 두되, 변경된 명령어만을 읽어들일 수 있다.The patch unit 210 checks the packet buffer 22 for a packet, and if there is a packet, reads the command from the memory, for example, the parsing map 26 of FIG. 3B, to parse the packet. The instruction stored in the memory can be easily changed by software. If the instruction is changed, the configuration of the packet parsing engine 20 is maintained, but only the modified instruction can be read.

디코딩부(220)는 패치부(210)에서 읽어들인 명령어의 명령코드(OP-code)를 디코딩한다. 예를 들어, 도 3b에 도시된 바와 같이 파싱 맵(26) 내 OP-code, 레지스터 파일, Constant, POS address(다음 수행으로 Jump시 사용) 등으로 디코딩할 수 있다. 이때, 동시에 다음 명령어가 패치부(210)를 통해 읽혀진다. 전술한 구조는 여러 프로세스 별로 라인이 나열되어 있어 동시에 프로세스 별로 프로세싱이 가능한 파이프라인 구조이다.The decoding unit 220 decodes an instruction code (OP-code) of a command read from the patch unit 210. [ For example, OP-code, register file, Constant, and POS address in the parsing map 26 (used in Jump next execution) can be decoded as shown in FIG. 3B. At this time, the next command is read through the patch unit 210 at the same time. The above-described structure is a pipeline structure in which lines are listed for various processes and can be processed at the same time.

실행부(230)는 디코딩부(220)에서 디코딩된 OP-code를 실행하여 입력 패킷을 파싱한다. 패킷 파싱 엔진(20)이 지원하는 OP-code는 ADD, AND, OR, SHIFT 등일 수 있다. 실행부(230)는 도 3b에 도시된 바와 같이 ALU(Arithmetic Logic Unit)(28)를 통한 산술 연산, 논리 연산, 이송, 건너뛰기, 입출력 등을 수행할 수 있다. 메모리 액세스부(240)는 실행부(230)의 실행 결과를 패킷 버퍼(22)에 저장(SAVE)하거나 패킷 버퍼(22)의 내용을 읽어들인다(LOAD). 라이트 백부(250)는 실행부(230)의 실행 결과를 레지스터 파일(4)에 기록(write)한다.The execution unit 230 executes the decoded OP-code in the decoding unit 220 and parses the input packet. The OP-code supported by the packet parsing engine 20 may be ADD, AND, OR, SHIFT, and the like. The execution unit 230 may perform an arithmetic operation, a logical operation, a transfer, a skip, an input / output, and the like through an arithmetic logic unit (ALU) 28 as shown in FIG. The memory access unit 240 stores the execution result of the execution unit 230 in the packet buffer 22 or reads the contents of the packet buffer 22. The write back unit 250 writes the execution result of the execution unit 230 in the register file 4. [

도 4는 본 발명의 일 실시 예에 따른 패킷 파싱을 위해 필요한 명령어를 도시한 참조도이다.FIG. 4 is a reference diagram illustrating instructions required for packet parsing according to an embodiment of the present invention. Referring to FIG.

도 4를 참조하면, 소프트웨어 방식으로 생성되는 명령어는 명령코드(OP-code)와 오퍼랜드(operand) 및 파라미터(parameter)를 포함한다. 명령코드(OP-code)는 연산 종류를 나타내기 위한 코드이고, 오퍼랜드(operand)는 명령어의 연산의 대상이 되는 데이터이거나, 데이터의 어드레스를 지정하는 부분이다. 도 4에서는 명령어의 일 예를 도시한 것일 뿐 이에 한정되지는 않는다.Referring to FIG. 4, a software-generated instruction includes an instruction code (OP-code) and an operand and a parameter. The command code (OP-code) is a code for indicating the type of operation, and the operand is data to be subjected to an operation of an instruction or a portion for specifying an address of data. FIG. 4 shows an example of the command but is not limited thereto.

도 5a 내지 도 5d는 본 발명의 일 실시 예에 따른 패킷 파싱에 의한 패킷을 분류하기 위해 사용되는 명령어의 예를 도시한 참조도이다.5A to 5D are reference views showing examples of commands used for classifying packets by packet parsing according to an embodiment of the present invention.

도 5a 내지 도 5d를 참조하면, 입력 패킷이 VLAN-IPV6-TCP 패킷인지 여부를 알아내기 위해, VLAN 패킷인지를 알아내는 과정, VLAN-IPV6 패킷인지를 알아내는 과정, VLAN-IPV6-TCP 패킷인지를 알아내는 과정이 단계적으로 수행된다.5A to 5D, in order to determine whether the input packet is a VLAN-IPV6-TCP packet, a process of determining whether the input packet is a VLAN packet, a process of determining whether the input packet is a VLAN-IPV6 packet, Is performed step by step.

세부적으로, 도 5a의 “adjustEndianParser”는 패킷 버퍼에서 일정 부분의 데이터를 읽어 들이는 명령어이다. 이때, “if(rBuf.w1 == VLAN_PACKET)”는 “adjustEndianParser” 명령어를 통해 읽어 들인 데이터를 토대로 해당 패킷이 VLAN 패킷인지 확인하는 부분이고, "if(rBuf.w1 == IPV6_PACKET)"은 “adjustEndianParser” 명령어를 통해 읽어 들인 데이터를 토대로 해당 패킷이 ipv6 패킷인지 확인하는 부분이고, "if(rBuf.w1 == IPV4_PACKET)"는 “adjustEndianParser” 명령어를 통해 읽어 들인 데이터를 토대로 해당 패킷이 ipv4 패킷인지 확인하는 부분이다. 한편, if(rBuf.w7 == IPV6_PACKET)는 “if(rBuf.w1 == VLAN_PACKET)”를 통해 입력 패킷이 VLAN 패킷으로 확인된 경우, 해당 패킷이 VLAN_ipv6 패킷인지를 확인하는 부분이다.In detail, "adjustEndianParser" in FIG. 5A is a command to read a certain portion of data from the packet buffer. In this case, "if (rBuf.w1 == IPV6_PACKET)" is a part for confirming whether the packet is a VLAN packet based on the data read through the "adjustEndianParser" command and "if (rBuf.w1 == IPV6_PACKET) "And" if (rBuf.w1 == IPV4_PACKET) "checks whether the packet is an ipv4 packet based on the data read through the" adjustEndianParser "command. . On the other hand, if (rBuf.w7 == IPV6_PACKET) is a portion for confirming whether the packet is a VLAN_ipv6 packet if the input packet is confirmed as a VLAN packet through "if (rBuf.w1 == VLAN_PACKET)".

도 5b 및 도 5c는 도 5a의 “if(rBuf.w7 == IPV6_PACKET)”를 통해 입력 패킷이 VLAN_ipv6 패킷으로 확인된 경우, 추가로 입력 패킷이 VLAN-IPV6_TCP 패킷인지를 알아내는 과정이다. 세부적으로, 도 5c의 “adjustEndianParser” 명령어를 통해 읽어 들인 데이터를 토대로 if(ip_protocol == IPV6_TCP_SERVICE)는 해당 패킷의 통신 프로토콜이 IPV6_TCP인지를 확인하는 부분이고, if(ip_protocol == IPV6_UDP_SERVICE)는 해당 패킷의 통신 프로토콜이 IPV6_UDP인지를 확인하는 부분이며, if(ip_protocol == IPV6_ICMP_SERVICE)는 해당 패킷의 통신 프로토콜이 IPV6_ICMP인지를 확인하는 부분이다.FIGS. 5B and 5C are a process for determining whether the input packet is a VLAN-IPV6_TCP packet when the input packet is identified as a VLAN_ipv6 packet through "if (rBuf.w7 == IPV6_PACKET)" in FIG. 5A. Specifically, if (ip_protocol == IPV6_TCP_SERVICE) is a part for confirming whether the communication protocol of the packet is IPV6_TCP, and if (ip_protocol == IPV6_UDP_SERVICE) is based on data read through the command "adjustEndianParser" (Ip_protocol == IPV6_ICMP_SERVICE) is a part for confirming whether the communication protocol of the packet is IPV6_ICMP.

한편, 도 5a 내지 도 5d의 예는 본 발명의 이해를 돕기 위한 일 실시 예일 뿐 이에 한정되는 것은 아니다.5A to 5D illustrate an embodiment of the present invention. However, the present invention is not limited thereto.

도 6은 본 발명의 일 실시 예에 따른 패킷 파싱 엔진의 패킷 파싱 방법을 도시한 흐름도이다.6 is a flowchart illustrating a packet parsing method of a packet parsing engine according to an embodiment of the present invention.

도 3a, 도 3b 및 도 6을 참조하면, 하드웨어 기반의 패킷 파싱 엔진(20)은 패킷 버퍼에 패킷이 있는지 검사하여 패킷이 있으면 해당 패킷을 파싱하기 위해 소프트웨어 기반으로 생성된 코드를 메모리로부터 읽어들인다(600). 메모리에 저장된 명령어 코드는 소프트웨어적으로 쉽게 변경 가능하며, 명령어 코드가 변경된 경우, 패킷 파싱 엔진의 구성은 그대로 두되, 패킷 파싱을 수행하기 위해 변경된 명령어 코드만을 읽어들일 수 있다.Referring to FIGS. 3A, 3B, and 6, the hardware-based packet parsing engine 20 examines the packet buffer for a packet, and if there is a packet, reads the code generated from the software based on the packet to parse the packet (600). The instruction code stored in the memory can be easily changed by software. If the instruction code is changed, the configuration of the packet parsing engine is maintained, but only the changed instruction code can be read to perform packet parsing.

이어서, 패킷 파싱 엔진(20)은 읽어들인 코드를 디코딩(610)하고, 디코딩된 코드를 실행하여 입력 패킷을 파싱한다(620). 패킷 파싱 엔진(20)이 지원하는 OP-code는 ADD, AND, OR, SHIFT 등일 수 있으나 이에 한정되지는 않는다. 이때, 패킷 파싱 엔진(20)은 산술 연산, 논리 연산, 이송, 건너뛰기, 입출력 등을 수행할 수 있다.The packet parsing engine 20 then decodes the read code 610 and executes the decoded code to parse the input packet 620. The OP-code supported by the packet parsing engine 20 may be ADD, AND, OR, SHIFT, and the like, but is not limited thereto. At this time, the packet parsing engine 20 can perform an arithmetic operation, a logical operation, a transfer, a skip, an input / output, and the like.

나아가, 패킷 파싱 엔진(20)은 실행 결과를 패킷 버퍼(22)에 저장(SAVE)하거나 패킷 버퍼(22)의 내용을 읽어들일 수 있다(LOAD). 나아가, 실행 결과를 레지스터 파일(24)에 기록할 수 있다.Further, the packet parsing engine 20 may save the execution result in the packet buffer 22 or read the contents of the packet buffer 22 (LOAD). Further, the execution result can be recorded in the register file 24.

이제까지 본 발명에 대하여 그 실시 예들을 중심으로 살펴보았다. 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시 예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.The embodiments of the present invention have been described above. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the disclosed embodiments should be considered in an illustrative rather than a restrictive sense. The scope of the present invention is defined by the appended claims rather than by the foregoing description, and all differences within the scope of equivalents thereof should be construed as being included in the present invention.

1: 코드 제공부 2: 패킷 파싱 프로세서
10: 코드 생성기 12: 코드 선 컴파일러
14: 컴파일러 20: 패킷 파싱 엔진
210: 패치부 220: 디코딩부
230: 실행부 240: 메모리 액세스부
250: 라이트 백부
1: Code Unblocking 2: Packet Parsing Processor
10: Code generator 12: Code line compiler
14: compiler 20: packet parsing engine
210: Patch section 220:
230: Execution unit 240: Memory access unit
250:

Claims (10)

패킷이 입력되어 저장되는 패킷 버퍼; 및
패킷 파싱을 위해 소프트웨어 기반으로 생성된 코드를 읽어들이고, 읽어들인 코드를 이용하여 상기 패킷 버퍼를 통해 입력되는 패킷을 파싱하는 하드웨어 기반의 적어도 하나의 패킷 파싱 엔진;
을 포함하는 것을 특징으로 하는 패킷 파싱 프로세서.
A packet buffer in which a packet is input and stored; And
At least one packet parsing engine based on hardware that reads code generated by software for packet parsing and parses a packet input through the packet buffer using the read code;
The packet parsing processor comprising:
제 1 항에 있어서, 각 패킷 파싱 엔진은,
패킷 파싱을 위한 코드가 변경되면 상기 변경된 코드를 읽어들여 입력 패킷을 파싱하는 것을 특징으로 하는 패킷 파싱 프로세서.
The packet parsing engine of claim 1,
If the code for packet parsing is changed, reads the changed code and parses the input packet.
제 1 항에 있어서, 각 패킷 파싱 엔진은,
패킷 버퍼에 패킷이 있는지 검사하여 패킷이 있으면 명령어를 읽어들이는 패치부;
읽어들인 명령어의 명령코드를 디코딩하는 디코딩부; 및
디코딩된 명령코드를 실행하여 입력 패킷을 파싱하는 실행부;
를 포함하는 것을 특징으로 하는 하드웨어 기반의 패킷 파싱 프로세서.
The packet parsing engine of claim 1,
A patch unit for checking whether there is a packet in the packet buffer and reading the command if there is a packet;
A decoding unit decoding the command code of the read command; And
An execution unit for executing the decoded instruction code and parsing the input packet;
Based packet parsing processor.
제 3 항에 있어서, 각 패킷 파싱 엔진은,
실행 결과를 패킷 버퍼에 저장하거나 패킷 버퍼의 내용을 읽어들이는 메모리 액세스부; 및
실행 결과를 레지스터 파일에 기록하는 라이트 백부;
를 더 포함하는 것을 특징으로 하는 패킷 파싱 프로세서.
4. The packet parsing engine of claim 3,
A memory access unit storing the execution result in the packet buffer or reading the contents of the packet buffer; And
A writeback unit for writing the execution result into a register file;
Wherein the packet parsing processor is further configured to:
제 4 항에 있어서, 각 패킷 파싱 엔진은,
각 패킷 파싱 엔진을 구성하는 구성요소 별로 라인이 나열되어 병렬로 동시에 처리하는 파이프라인 구조를 갖는 것을 특징으로 하는 패킷 파싱 프로세서.
5. The packet parsing engine of claim 4,
Wherein each of the packet parsing engines has a pipeline structure in which lines are listed and processed in parallel for each of the components constituting the packet parsing engine.
제 1 항에 있어서, 각 패킷 파싱 엔진은,
FPGA 형태인 것을 특징으로 하는 패킷 파싱 프로세서.
The packet parsing engine of claim 1,
Wherein the packet-parsing processor is in the form of an FPGA.
제 1 항에 있어서, 각 패킷 파싱 엔진은,
대상이 되는 각 입력 패킷을 대상으로 동시에 병렬 처리하는 것을 특징으로 하는 패킷 파싱 프로세서.
The packet parsing engine of claim 1,
And parallel processing is simultaneously performed on each input packet as a target.
패킷 파싱을 위해 필요한 코드를 생성하여 제공하는 소프트웨어 기반의 코드 제공부;
상기 코드 제공부에서 제공하는 코드를 저장하는 메모리; 및
상기 메모리로부터 코드를 읽어들이고, 읽어들인 코드를 이용하여 입력 패킷을 파싱하는 하드웨어 기반의 적어도 하나의 패킷 파싱 엔진;
을 포함하는 것을 특징으로 하는 패킷 파싱 시스템.
A software-based code providing unit for generating and providing a code necessary for packet parsing;
A memory for storing codes provided by the code providing unit; And
At least one packet parsing engine based on hardware that reads code from the memory and parses the input packet using the read code;
The packet parsing system comprising:
제 8 항에 있어서, 상기 코드 제공부는,
패킷 파싱을 위한 코드를 생성하는 코드 생성기;
상기 코드 생성기에 의해 생성된 코드를 각 패킷 파싱 엔진이 사용 가능한 환경에 맞추어 변경하는 코드 선 컴파일러; 및
상기 코드 선 컴파일러에 의해 변경된 코드를 명령코드와 오퍼랜드로 조합된 명령어로 변환하는 컴파일러;
를 포함하는 것을 특징으로 하는 패킷 파싱 시스템.
9. The information processing apparatus according to claim 8,
A code generator for generating a code for packet parsing;
A code line compiler for changing the code generated by the code generator according to an environment available for each packet parsing engine; And
A compiler for converting the code changed by the code line compiler into a command combined with an instruction code and an operand;
And the packet parsing system.
하드웨어 기반의 패킷 파싱 엔진의 패킷 파싱 방법에 있어서,
패킷 버퍼에 패킷이 있는지 검사하여 패킷이 있으면 해당 패킷을 파싱하기 위해 소프트웨어 기반으로 생성된 코드를 메모리로부터 읽어들이는 단계;
읽어들인 코드를 디코딩하는 단계; 및
디코딩된 코드를 실행하여 입력 패킷을 파싱하는 단계;
를 포함하는 것을 특징으로 하는 패킷 파싱 방법.
A packet parsing method of a hardware-based packet parsing engine,
Checking the packet buffer for a packet and reading the software-generated code from the memory to parse the packet if the packet exists;
Decoding the read code; And
Parsing the input packet by executing the decoded code;
And transmitting the packet to a destination.
KR1020130120007A 2013-10-08 2013-10-08 Packet parsing processor, system and method thereof KR101553399B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020130120007A KR101553399B1 (en) 2013-10-08 2013-10-08 Packet parsing processor, system and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020130120007A KR101553399B1 (en) 2013-10-08 2013-10-08 Packet parsing processor, system and method thereof

Publications (2)

Publication Number Publication Date
KR20150041460A true KR20150041460A (en) 2015-04-16
KR101553399B1 KR101553399B1 (en) 2015-09-15

Family

ID=53034947

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020130120007A KR101553399B1 (en) 2013-10-08 2013-10-08 Packet parsing processor, system and method thereof

Country Status (1)

Country Link
KR (1) KR101553399B1 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2096832A1 (en) 2008-02-28 2009-09-02 Deutsche Thomson OHG Reconfigurable hardware-based parser for packet-oriented protocols

Also Published As

Publication number Publication date
KR101553399B1 (en) 2015-09-15

Similar Documents

Publication Publication Date Title
US9652505B2 (en) Content search pattern matching using deterministic finite automata (DFA) graphs
EP2668574B1 (en) Utilizing special purpose elements to implement a fsm
US9495479B2 (en) Traversal with arc configuration information
US7949683B2 (en) Method and apparatus for traversing a compressed deterministic finite automata (DFA) graph
US8180803B2 (en) Deterministic finite automata (DFA) graph compression
US8867395B2 (en) Accelerating data packet parsing
US9398033B2 (en) Regular expression processing automaton
US9787693B2 (en) Graph caching
US8819217B2 (en) Intelligent graph walking
US8176300B2 (en) Method and apparatus for content based searching
US20070266370A1 (en) Data Plane Technology Including Packet Processing for Network Processors
US20110016154A1 (en) Profile-based and dictionary based graph caching
Niemiec et al. A survey on FPGA support for the feasible execution of virtualized network functions
US9965434B2 (en) Data packet processing
US20210064443A1 (en) Hardware offload support for an operating system offload interface using operation code verification
US9979802B2 (en) Assembling response packets
US10084893B2 (en) Host network controller
KR101553399B1 (en) Packet parsing processor, system and method thereof
KR20200061280A (en) Method for Static Analysis based on Data Dependence on Data Plane Towards Network Switch Parallelization, and Parallelization Apparatus using the same
JP2006115068A (en) Packet processor

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20180910

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20190909

Year of fee payment: 5