KR102503272B1 - Method, apparauts and computer program for processing packet in network equipment - Google Patents

Method, apparauts and computer program for processing packet in network equipment Download PDF

Info

Publication number
KR102503272B1
KR102503272B1 KR1020210024744A KR20210024744A KR102503272B1 KR 102503272 B1 KR102503272 B1 KR 102503272B1 KR 1020210024744 A KR1020210024744 A KR 1020210024744A KR 20210024744 A KR20210024744 A KR 20210024744A KR 102503272 B1 KR102503272 B1 KR 102503272B1
Authority
KR
South Korea
Prior art keywords
packet
packets
storage space
thread
processing
Prior art date
Application number
KR1020210024744A
Other languages
Korean (ko)
Other versions
KR20220120939A (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 KR1020210024744A priority Critical patent/KR102503272B1/en
Publication of KR20220120939A publication Critical patent/KR20220120939A/en
Application granted granted Critical
Publication of KR102503272B1 publication Critical patent/KR102503272B1/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/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3836Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
    • G06F9/3851Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution from multiple instruction streams, e.g. multistreaming
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/82Miscellaneous aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9057Arrangements for supporting packet reassembly or resequencing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9063Intermediate storage in different physical parts of a node or terminal
    • H04L49/9078Intermediate storage in different physical parts of a node or terminal using an external memory or storage device

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

본 발명은 네트워크 장비에서의 패킷 프로세싱 방법, 장치 및 컴퓨터 프로그램에 관한 것으로서, 보다 구체적으로는 대용량 네트워크 트래픽을 처리하기 위하여 멀티 쓰레드를 사용하는 네트워크 장비에서 패킷을 처리하거나 저장하는 순서를 보장하여 처리하기 위한 방법, 장치 및 컴퓨터 프로그램에 관한 것이다.
본 발명에서는, 네트워크 장비에서 패킷을 처리하거나 저장하는 방법에 있어서, 패킷을 수집하여 복수의 쓰레드를 가지는 멀티 쓰레드로 분산해 처리한 후 저장 공간에 저장하는 패킷 수집 단계; 및 상기 저장 공간에 저장된 패킷을 상기 수집된 순서에 따라 처리하거나 저장하는 패킷 처리 단계;를 포함하며, 상기 저장 공간에는 상기 패킷 및 상기 패킷이 상기 멀티 쓰레드로 유입되는 패킷 유입 시간이 매칭되어 저장되고, 상기 패킷 처리 단계에서는, 상기 패킷 유입 시간을 이용하여 상기 패킷을 처리하거나 저장하는 순서를 산출하는 것을 특징으로 하는 네트워크 장비에서의 패킷 프로세싱 방법을 개시한다.
The present invention relates to a method, apparatus, and computer program for processing packets in network equipment, and more particularly, in order to process large-capacity network traffic, network equipment using multi-threads guarantees the order in which packets are processed or stored. It relates to methods, devices and computer programs for
In the present invention, in a method for processing or storing packets in network equipment, there is provided a packet collection step of collecting packets, distributing and processing them into multi-threads having a plurality of threads, and then storing the packets in a storage space; and a packet processing step of processing or storing the packets stored in the storage space according to the collected order, wherein the packets and the packet inflow times of the packets flowing into the multi-thread are matched and stored in the storage space. , In the packet processing step, a packet processing method in network equipment is disclosed, wherein an order of processing or storing the packets is calculated using the packet inflow time.

Description

네트워크 장비에서의 패킷 프로세싱 방법, 장치 및 컴퓨터 프로그램{METHOD, APPARAUTS AND COMPUTER PROGRAM FOR PROCESSING PACKET IN NETWORK EQUIPMENT}Packet processing method, apparatus and computer program in network equipment

본 발명은 네트워크 장비에서의 패킷 프로세싱 방법, 장치 및 컴퓨터 프로그램에 관한 것으로서, 보다 구체적으로는 대용량 네트워크 트래픽을 처리하기 위하여 멀티 쓰레드를 사용하는 네트워크 장비에서 패킷을 처리하거나 저장하는 순서를 보장하여 처리하기 위한 방법, 장치 및 컴퓨터 프로그램에 관한 것이다.The present invention relates to a method, apparatus, and computer program for processing packets in network equipment, and more particularly, in order to process large-capacity network traffic, network equipment using multi-threads guarantees the order in which packets are processed or stored. It relates to methods, devices and computer programs for

[이 발명을 지원한 연구개발사업][R&D project supporting this invention]

[과제고유번호]         D2020100[Assignment identification number]         D2020100

[부처명]               경기도[Name of Ministry]              

[연구관리전문기관]     (재)경기도경제과학진흥원[Research management specialized institution]    

[연구사업명]            기업주도 일반[Research project name]

[연구과제명]         스마트 광 바이패스 탑재형 100GE NIC 개발[Research Project Title] Development of 100GE NIC with Smart Optical Bypass

[기여율]                1/1[Contribution rate] 1/1

[주관연구기관]          (주)윈스[Host Research Institution]          Wins Co., Ltd.

[연구기간]              2020. 2. 1. ~ 2021. 2. 28.[Research period] 2020. 2. 1. ~ 2021. 2. 28.

정보통신 기술의 발달과 함께 사용자가 다양한 온라인 서비스가 확산되고 있으며, 네트워크 장비에서 처리해야 하는 트래픽도 빠르게 증가하고 있다. With the development of information and communication technology, various online services for users are spreading, and traffic that must be processed by network equipment is rapidly increasing.

이에 따라, 최근에는 대용량의 트래픽을 처리하기 위한 하여 고성능 네트워크 장비가 폭넓게 사용되고 있다.Accordingly, in recent years, high-performance network equipment has been widely used to process large amounts of traffic.

그런데, 종래의 저성능 네트워크 장비에서는 단일 쓰레드를 사용하여 패킷의 처리를 패킷 유입 시점에 복사 처리함으로써 패킷 순서를 보장할 수 있었으나, 대용량 트래픽을 처리하기 위한 고성능 네트워크 장비에서는 멀티 쓰레드 환경의 분산 처리를 수행하면서 트래픽이 각 쓰레드로 분산되어 처리된다.However, in conventional low-performance network equipment, packet order can be guaranteed by duplicating packet processing at the point of packet inflow using a single thread. As it runs, traffic is distributed to each thread for processing.

이때, 각 쓰레드에서는 할당되는 패킷의 프로토콜이나 데이터 크기 등에 따라 처리 속도가 달라질 수 있으며, 이에 따라 고성능 네트워크 장비에서는 패킷의 인입 순서와 처리 순서가 보장되지 못하는 문제가 나타날 수 있다. In this case, the processing speed may vary according to the protocol or data size of the allocated packet in each thread, and accordingly, in high-performance network equipment, there may be a problem that the incoming order and processing order of packets are not guaranteed.

보다 구체적인 예를 들어, 고성능 네트워크 보안 장비에서 패킷의 인입 순서는 다양한 네트워크 위협에 대한 보안 분석을 위해 사용될 수 있으며, 나아가 패킷의 인입 시간은 이를 이용한 인과 관계 분석을 통해 트래픽의 특이점을 분석하는데도 사용될 수 있다.For a more specific example, in high-performance network security equipment, the incoming sequence of packets can be used for security analysis on various network threats, and furthermore, the incoming time of packets can also be used to analyze traffic singularities through causal relationship analysis using this. there is.

그런데, 멀티 쓰레드 환경에서 고속의 트래픽이 병렬로 처리되는 환경에서 각 패킷의 인입 순서를 식별하기 위해서는 많은 자원(resource)이 요구되며, 나아가 이를 위해 별도의 프로세스를 수행하는 경우 네트워크 장비에서 상당한 성능 저하가 유발될 수도 있다.However, in an environment where high-speed traffic is processed in parallel in a multi-threaded environment, a lot of resources are required to identify the incoming order of each packet, and furthermore, significant performance degradation in network equipment when a separate process is performed for this purpose. may be induced.

대한민국 등록특허공보 제10-18143680000호 (2017.12.27)Republic of Korea Patent Registration No. 10-18143680000 (2017.12.27)

본 발명은 상기와 같은 종래 기술의 문제점을 해결하기 위해 창안된 것으로, 대용량 네트워크 트래픽을 처리하기 위하여 멀티 쓰레드를 사용하는 네트워크 장비에서 패킷을 처리하거나 저장하는 순서를 보장할 수 있는 네트워크 장비에서의 패킷 프로세싱 방법, 장치 및 컴퓨터 프로그램을 제공하는 것을 목적으로 한다.The present invention was invented to solve the problems of the prior art as described above, and packets in network equipment that can guarantee the order of processing or storing packets in network equipment using multi-threads to process large-capacity network traffic. It is an object to provide processing methods, devices and computer programs.

상기 과제를 해결하기 위한 본 발명의 한 측면에 따른 네트워크 장비에서의 패킷 프로세싱 방법은, 네트워크 장비에서 패킷을 처리하거나 저장하는 방법에 있어서, 패킷을 수집하여 복수의 쓰레드를 가지는 멀티 쓰레드로 분산해 처리한 후 저장 공간에 저장하는 패킷 수집 단계; 및 상기 저장 공간에 저장된 패킷을 상기 수집된 순서에 따라 처리하거나 저장하는 패킷 처리 단계;를 포함하며, 상기 저장 공간에는 상기 패킷 및 상기 패킷이 상기 멀티 쓰레드로 유입되는 패킷 유입 시간이 매칭되어 저장되고, 상기 패킷 처리 단계에서는, 상기 패킷 유입 시간을 이용하여 상기 패킷을 처리하거나 저장하는 순서를 산출하는 것을 특징으로 한다.A packet processing method in network equipment according to an aspect of the present invention for solving the above problems is a method for processing or storing packets in network equipment, collecting packets and distributing and processing them in multi-threads having a plurality of threads. A packet collection step of storing the packets in a storage space; and a packet processing step of processing or storing the packets stored in the storage space according to the collected order, wherein the packets and the packet inflow times of the packets flowing into the multi-thread are matched and stored in the storage space. , In the packet processing step, an order of processing or storing the packets is calculated using the packet inflow time.

여기서, 상기 패킷을 저장할 수 있는 저장 공간을 할당하여 제공하거나 반환받아 관리하는 패킷 관리 단계;를 더 포함할 수 있다.Here, it may further include a packet management step of allocating and providing or receiving and managing a storage space capable of storing the packets.

이때, 상기 패킷 관리 단계에서는, 상기 저장 공간을 각 쓰레드 별로 나누어 상기 각 쓰레드에서 출력되는 패킷을 저장할 수 있다.At this time, in the packet management step, the storage space may be divided for each thread and packets output from each thread may be stored.

또한, 상기 패킷 수집 단계에서는, 순차 유입되는 패킷을 미리 정해진 규칙에 따라 나누어 멀티 쓰레드로 분산해 처리할 수 있다.In addition, in the packet collection step, packets that are sequentially introduced may be divided according to predetermined rules and processed in a distributed manner in multi-threads.

나아가, 상기 패킷 수집 단계에서는, 각 쓰레드 별로 나누어 상기 각 쓰레드에서 처리되어 출력되는 순서에 따라 상기 패킷을 상기 저장 공간에 저장할 수 있다.Furthermore, in the packet collection step, the packets may be stored in the storage space according to the order in which each thread is divided and processed and output in each thread.

더 나아가, 상기 패킷 처리 단계에서는, 상기 저장 공간에 각 쓰레드 별로 남아있는 패킷 중 가장 먼저 출력된 패킷들의 패킷 유입 시간을 비교하여 상기 패킷을 처리하거나 저장하는 순서를 산출할 수 있다.Furthermore, in the packet processing step, an order of processing or storing the packets may be calculated by comparing packet inflow times of packets output first among packets remaining for each thread in the storage space.

또한, 상기 패킷 수집 단계에서는, 상기 패킷이 멀티 쓰레드 보안 엔진으로 분산되어 처리되며, 상기 패킷 처리 단계에서는, 미리 정해진 분량의 패킷을 상기 수집된 순서에 따라 정렬하여 저장할 수 있다.In addition, in the packet collection step, the packets are distributed and processed by a multi-threaded security engine, and in the packet processing step, a predetermined amount of packets may be sorted and stored according to the collected order.

또한, 상기 패킷 수집 단계에서는, 상기 패킷을 저장하고자 하는 쓰레드에 대한 저장 공간의 할당 여부를 판단하여, 할당되지 않은 경우에는 저장 공간을 요청하여 할당받을 수 있다.In addition, in the packet collecting step, it is determined whether storage space is allocated to a thread to store the packet, and if the storage space is not allocated, the storage space may be requested and allocated.

이때, 상기 패킷 수집 단계에서는, 할당된 저장 공간의 여유 상태를 확인하여 부족한 경우 상기 할당된 저장 공간을 반환한 후, 필요한 저장 공간을 요청하여 할당받을 수 있다.At this time, in the packet collection step, after checking the free state of the allocated storage space and returning the allocated storage space if it is insufficient, the required storage space may be requested and allocated.

또한, 본 발명의 다른 측면에 따른 네트워크 장비는, 패킷을 수집하여 복수의 쓰레드를 가지는 멀티 쓰레드로 분산해 처리한 후 저장 공간에 저장하는 패킷 수집부; 및 상기 저장 공간에 저장된 패킷을 상기 수집된 순서에 따라 처리하거나 저장하는 패킷 처리부;를 포함하며, 상기 저장 공간에는 상기 패킷 및 상기 패킷이 상기 멀티 쓰레드로 유입되는 패킷 유입 시간이 매칭되어 저장되고, 상기 패킷 처리부에서는, 상기 패킷 유입 시간을 이용하여 상기 패킷을 처리하거나 저장하는 순서를 산출하는 것을 특징으로 한다.In addition, the network equipment according to another aspect of the present invention includes a packet collection unit for collecting packets, distributing and processing them into multi-threads having a plurality of threads, and then storing them in a storage space; and a packet processing unit for processing or storing the packets stored in the storage space in the collected order, wherein the packets and packet inflow times of the packets flowing into the multi-thread are matched and stored in the storage space, The packet processing unit may calculate an order of processing or storing the packets using the packet inflow time.

본 발명의 일 실시예에 따른 네트워크 장비에서의 패킷 프로세싱 방법, 장치 및 컴퓨터 프로그램은, 대용량 네트워크 트래픽을 처리하기 위하여 멀티 쓰레드를 사용하는 네트워크 장비에서 패킷을 처리하거나 저장하는 순서를 보장할 수 있게 된다.A packet processing method, apparatus, and computer program in network equipment according to an embodiment of the present invention can ensure the order of processing or storing packets in network equipment using multi-threads to process large-capacity network traffic. .

또한, 본 발명의 일 실시예에 따른 네트워크 장비에서의 패킷 프로세싱 방법, 장치 및 컴퓨터 프로그램에서는, 패킷을 인입 순서에 따라 처리하면서도 이를 구현하는 과정에서 나타날 수 있는 네트워크 장비에서의 성능 저하 및 패킷 유실 등의 문제도 효과적으로 방지할 수 있게 된다.In addition, in the packet processing method, apparatus, and computer program in network equipment according to an embodiment of the present invention, while processing packets according to incoming order, performance degradation and packet loss in network equipment that may occur in the process of implementing them, etc. problems can be effectively prevented.

본 발명에 관한 이해를 돕기 위해 상세한 설명의 일부로 포함되는, 첨부도면은 본 발명에 대한 실시예를 제공하고, 상세한 설명과 함께 본 발명의 기술적 사상을 설명한다.
도 1은 본 발명의 일 실시예에 따른 네트워크 장비에서의 패킷 프로세싱 방법의 순서도이다.
도 2는 본 발명의 일 실시예에 따른 네트워크 장비의 블록도이다.
도 3 내지 도 4는 본 발명의 일 실시예에 따른 네트워크 장비에서의 멀티 쓰레드 동작 환경을 설명하는 도면이다.
도 5는 본 발명의 일 실시예에 따른 네트워크 장비에서의 패킷 프로세싱 방법의 저장 공간 할당을 설명하는 순서도이다.
도 6은 본 발명의 일 실시예에 따른 네트워크 장비에서의 저장 공간의 구성을 예시하는 도면이다.
도 7 내지 도 8은 본 발명의 일 실시예에 따른 네트워크 장비에서의 패킷 프로세싱 방법에서 패킷 관리 단계에서의 저장 공간 관리를 설명하는 도면이다.
도 9는 본 발명의 일 실시예에 따른 네트워크 장비에서의 패킷 프로세싱 방법에서 패킷 처리 단계의 동작을 설명하는 도면이다.
The accompanying drawings, which are included as part of the detailed description to aid understanding of the present invention, provide examples of the present invention and explain the technical idea of the present invention together with the detailed description.
1 is a flowchart of a packet processing method in network equipment according to an embodiment of the present invention.
2 is a block diagram of network equipment according to an embodiment of the present invention.
3 and 4 are diagrams illustrating a multi-threaded operating environment in network equipment according to an embodiment of the present invention.
5 is a flowchart illustrating storage space allocation of a packet processing method in network equipment according to an embodiment of the present invention.
6 is a diagram illustrating a configuration of a storage space in network equipment according to an embodiment of the present invention.
7 to 8 are diagrams illustrating storage space management in a packet management step in a packet processing method in network equipment according to an embodiment of the present invention.
9 is a diagram illustrating an operation of a packet processing step in a packet processing method in network equipment according to an embodiment of the present invention.

본 발명은 다양한 변환을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 이하에서는 특정 실시예들을 첨부된 도면을 기초로 상세히 설명하고자 한다.The present invention can apply various transformations and can have various embodiments. Hereinafter, specific embodiments will be described in detail based on the accompanying drawings.

이하의 실시예는 본 명세서에서 기술된 방법, 장치 및/또는 시스템에 대한 포괄적인 이해를 돕기 위해 제공된다. 그러나 이는 예시에 불과하며 본 발명은 이에 제한되지 않는다.The following examples are provided to facilitate a comprehensive understanding of the methods, apparatus and/or systems described herein. However, this is only an example and the present invention is not limited thereto.

본 발명의 실시예들을 설명함에 있어서, 본 발명과 관련된 공지기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략하기로 한다. 그리고, 후술되는 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서 이는 사용자, 운용자의 의도 또는 관례 등에 따라 달라질 수 있다. 그러므로 그 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다. 상세한 설명에서 사용되는 용어는 단지 본 발명의 실시 예들을 기술하기 위한 것이며, 결코 제한적이어서는 안 된다. 명확하게 달리 사용되지 않는 한, 단수 형태의 표현은 복수 형태의 의미를 포함한다. 본 설명에서, "포함" 또는 "구비"와 같은 표현은 어떤 특성들, 숫자들, 단계들, 동작들, 요소들, 이들의 일부 또는 조합을 가리키기 위한 것이며, 기술된 것 이외에 하나 또는 그 이상의 다른 특성, 숫자, 단계, 동작, 요소, 이들의 일부 또는 조합의 존재 또는 가능성을 배제하도록 해석되어서는 안 된다. In describing the embodiments of the present invention, if it is determined that the detailed description of the known technology related to the present invention may unnecessarily obscure the subject matter of the present invention, the detailed description will be omitted. In addition, terms to be described later are terms defined in consideration of functions in the present invention, which may vary according to the intention or custom of a user or operator. Therefore, the definition should be made based on the contents throughout this specification. Terms used in the detailed description are only for describing the embodiments of the present invention, and should not be limiting. Unless expressly used otherwise, singular forms of expression include plural forms. In this description, expressions such as "comprising" or "comprising" are intended to indicate any characteristic, number, step, operation, element, portion or combination thereof, one or more other than those described. It should not be construed to exclude the existence or possibility of any other feature, number, step, operation, element, part or combination thereof.

또한, 제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되는 것은 아니며, 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.In addition, terms such as first and second may be used to describe various components, but the components are not limited by the terms, and the terms are used for the purpose of distinguishing one component from another. used only as

이하에서는, 본 발명에 따른 네트워크 장비에서의 패킷 프로세싱 방법, 장치 및 컴퓨터 프로그램의 예시적인 실시형태들을 첨부된 도면을 참조하여 상세히 설명한다.Hereinafter, exemplary embodiments of a packet processing method, apparatus and computer program in network equipment according to the present invention will be described in detail with reference to the accompanying drawings.

먼저, 도 1에서는 본 발명의 일 실시예에 따른 네트워크 장비(100)에서의 패킷 프로세싱 방법의 순서도를 보여주고 있다. 도 1에서 볼 수 있는 바와 같이, 본 발명의 일 실시예에 따른 네트워크 장비(100)에서의 패킷 프로세싱 방법은, 네트워크 장비(100)에서 패킷을 처리하거나 저장하는 방법에 있어서, 패킷을 수집하여 복수의 쓰레드를 가지는 멀티 쓰레드(112)로 분산해 처리한 후 저장 공간(121)에 저장하는 패킷 수집 단계(S110) 및 상기 저장 공간(121)에 저장된 패킷을 상기 수집된 순서에 따라 처리하거나 저장하는 패킷 처리 단계(S130)를 포함할 수 있다.First, FIG. 1 shows a flowchart of a packet processing method in the network equipment 100 according to an embodiment of the present invention. As can be seen in Figure 1, the packet processing method in the network equipment 100 according to an embodiment of the present invention, in the method for processing or storing packets in the network equipment 100, by collecting the packets A packet collection step (S110) of distributing, processing, and storing the packets in the storage space 121 by multi-threads 112 having threads of and processing or storing the packets stored in the storage space 121 according to the collected order A packet processing step (S130) may be included.

이때, 상기 저장 공간(121)에는 상기 패킷 및 상기 패킷이 상기 멀티 쓰레드(112)로 유입되는 패킷 유입 시간이 매칭되어 저장되고, 상기 패킷 처리 단계(S130)에서는 상기 패킷 유입 시간을 이용하여 상기 패킷을 처리하거나 저장하는 순서를 산출해 적용할 수 있다.At this time, in the storage space 121, the packet and the packet inflow time of the packet flowing into the multi-thread 112 are matched and stored, and in the packet processing step (S130), the packet inflow time is used to store the packet The order of processing or storing can be calculated and applied.

나아가, 본 발명의 일 실시예에 따른 네트워크 장비(100)에서의 패킷 프로세싱 방법에서는, 도 1에서 볼 수 있는 바와 같이, 상기 패킷을 저장할 수 있는 저장 공간(121)을 할당하여 제공하거나 반환받아 관리하는 패킷 관리 단계(S120)를 더 포함할 수도 있다.Furthermore, in the packet processing method in the network equipment 100 according to an embodiment of the present invention, as can be seen in FIG. 1, a storage space 121 capable of storing the packet is allocated and provided or returned and managed. It may further include a packet management step (S120) of doing.

또한, 본 발명의 일 실시예에 따른 네트워크 장비(100)는, 도 2에서 볼 수 있는 바와 같이, 패킷을 수집하여 복수의 쓰레드를 가지는 멀티 쓰레드(112)로 분산해 처리한 후 저장 공간(121)에 저장하는 패킷 수집부(110) 및 상기 저장 공간(121)에 저장된 패킷을 상기 수집된 순서에 따라 처리하거나 저장하는 패킷 처리부(130)를 포함하여 구성될 수 있으며, 이때 상기 저장 공간(121)에는 상기 패킷 및 상기 패킷이 상기 멀티 쓰레드(112)로 유입되는 패킷 유입 시간이 매칭되어 저장될 수 있고, 또한 상기 패킷 처리부(130)에서는 상기 패킷 유입 시간을 이용하여 상기 패킷을 처리하거나 저장하는 순서를 산출하여 적용할 수 있다.In addition, as shown in FIG. 2, the network equipment 100 according to an embodiment of the present invention collects packets, distributes and processes them in a multi-thread 112 having a plurality of threads, and then stores the space 121 ) and a packet processing unit 130 that processes or stores the packets stored in the storage space 121 according to the collected order. At this time, the storage space 121 ), the packet and the packet inflow time when the packet flows into the multi-thread 112 may be matched and stored, and the packet processing unit 130 uses the packet inflow time to process or store the packet The sequence can be calculated and applied.

나아가, 본 발명의 일 실시예에 따른 네트워크 장비(100)에는, 도 2에서 볼 수 있는 바와 같이, 상기 패킷을 저장할 수 있는 저장 공간(121)을 할당하여 제공하거나 반환받아 관리하는 패킷 관리부(120)가 더 포함될 수도 있다.Furthermore, as can be seen in FIG. 2, in the network equipment 100 according to an embodiment of the present invention, a packet management unit 120 that allocates and provides or receives and manages a storage space 121 capable of storing the packets. ) may be further included.

이에 따라, 본 발명의 일 실시예에 따른 네트워크 장비(100)에서의 패킷 프로세싱 방법, 장치 및 컴퓨터 프로그램에서는, 대용량 네트워크 트래픽을 처리하기 위하여 멀티 쓰레드(112)를 사용하는 네트워크 장비(100)에서 패킷을 처리하거나 저장하는 순서를 보장할 수 있으며, 나아가 패킷을 인입 순서에 따라 처리하면서도 이를 구현하는 과정에서 나타날 수 있는 네트워크 장비(100)에서의 성능 저하 및 패킷 유실 등의 문제도 효과적으로 방지할 수 있게 된다.Accordingly, in the packet processing method, apparatus, and computer program in the network equipment 100 according to an embodiment of the present invention, the network equipment 100 using the multi-thread 112 to process large-capacity network traffic It is possible to guarantee the order of processing or storing, and furthermore, while processing packets in the incoming order, problems such as performance degradation and packet loss in the network equipment 100 that may occur in the process of implementing it can be effectively prevented. do.

이하, 도 1 및 도 2를 참조하여 본 발명의 일 실시예에 따른 네트워크 장비(100)에서의 패킷 프로세싱 방법, 장치 및 컴퓨터 프로그램을 각 구성 요소별로 나누어 보다 자세하게 살핀다.Hereinafter, with reference to FIGS. 1 and 2, a packet processing method, device, and computer program in the network equipment 100 according to an embodiment of the present invention will be divided into components and examined in more detail.

먼저, 상기 패킷 수집 단계(S110)에서는, 상기 네트워크 장비(100)의 패킷 수집부(110)가 패킷을 수집하여 복수의 쓰레드를 가지는 멀티 쓰레드(112)로 분산해 처리한 후 저장 공간에 저장하게 된다.First, in the packet collecting step (S110), the packet collecting unit 110 of the network equipment 100 collects packets, distributes them to the multi-thread 112 having a plurality of threads, processes them, and stores them in a storage space. do.

보다 구체적으로, 도 3에서 볼 수 있는 바와 같이, 상기 패킷 수집 단계(S110)에서는 네트워크 인터페이스 카드(111)를 통해 순차 유입되는 패킷(예를 들어, 도 3의 1~9)을 미리 정해진 규칙에 따라 나누어 복수의 쓰레드(예를 들어, 도 3의 112a ~ 112n)를 가지는 멀티 쓰레드(112)로 분산해 처리할 수 있다.More specifically, as can be seen in FIG. 3, in the packet collecting step (S110), packets sequentially flowing through the network interface card 111 (eg, 1 to 9 in FIG. 3) are classified according to predetermined rules. It can be divided according to the multi-thread 112 having a plurality of threads (eg, 112a to 112n in FIG. 3 ) for processing.

예를 들어, 상기 멀티 쓰레드(112)는 멀티 쓰레드 보안 엔진으로 구성되어 각 보안 엔진으로 인입되는 패킷에 대안 보안 프로세스를 수행할 수 있다.For example, the multi-thread 112 may be configured as a multi-threaded security engine to perform an alternate security process on incoming packets to each security engine.

이후, 상기 각 쓰레드(예를 들어, 도 3의 112a ~ 112n)에서 처리된 패킷은 버퍼(113) 등을 거쳐 상기 네트워크 장비(100)로 유입된 순서로 다시 정렬되어 출력(114)될 수 있다.Thereafter, the packets processed by each thread (eg, 112a to 112n in FIG. 3 ) may be rearranged in the order of flowing into the network equipment 100 through the buffer 113 and output 114. .

즉, 종래의 저성능 네트워크 장비에서는 단일 쓰레드를 사용하여 패킷의 처리를 패킷 유입 시점에 복사 처리함으로써 패킷 순서를 보장할 수 있었으나, 도 4(a)에서 볼 수 있는 바와 같이, 대용량 트래픽을 처리하기 위한 고성능 네트워크 장비에서는 멀티 쓰레드(112) 환경의 분산 처리를 수행하면서 트래픽이 각 쓰레드로 분산되어 처리되면서, 각 쓰레드에서 소요되는 처리 시간이 달라질 수 있어 처리 후 출력되는 패킷의 순서가 달라지는 문제가 나타날 수 있었다.That is, in the conventional low-performance network equipment, the order of packets can be guaranteed by duplicating packet processing at the time of packet inflow using a single thread, but as shown in FIG. In high-performance network equipment for multi-thread (112) environment, traffic is distributed and processed in each thread while performing distributed processing, and the processing time required for each thread may vary, resulting in a problem that the order of output packets after processing is different. could

이에 대하여, 본 발명의 일 실시예에 따른 네트워크 장비(100)에서의 패킷 프로세싱 방법, 장치 및 컴퓨터 프로그램에서는, 도 4(b)에서 볼 수 있는 바와 같이, 상기 멀티 쓰레드(112)에서 출력되는 패킷을 상기 네트워크 장비(100)로 유입된 순서로 다시 정렬하여 출력(114)하게 된다.In contrast, in the packet processing method, device, and computer program in the network equipment 100 according to an embodiment of the present invention, as shown in FIG. 4 (b), the packet output from the multi-thread 112 is rearranged in the order of flow into the network equipment 100 and output 114.

보다 구체적으로, 상기 패킷 수집 단계(S110)에서는, 상기 멀티 쓰레드(112)에서 출력되는 패킷을 각 쓰레드 별로 나누어 상기 각 쓰레드에서 처리되어 출력되는 순서에 따라 상기 저장 공간(121)에 저장하게 된다.More specifically, in the packet collecting step (S110), the packets output from the multi-thread 112 are divided into respective threads and stored in the storage space 121 according to the order in which the respective threads process and output the packets.

보다 구체적인 예를 들어, 도 3에서 제1 쓰레드(112a)로 입력된 패킷(1, 2), 제2 쓰레드(112b)로 입력된 패킷(3, 4), 제3 쓰레드(112c)로 입력된 패킷(3), 제4 쓰레드(112d)로 입력된 패킷(6, 8), 제5 쓰레드(112e)로 입력된 패킷(7, 9)은, 출력되면서 다시 각 쓰레드 별로 나누어 출력되는 순서에 따라 저장 공간(121)에 저장된다(예를 들어, 도 9(a)에서 볼 수 있는 바와 같이, 제1 쓰레드(112a)에서는 패킷(1)이 먼저 출력되고 패킷(2)가 나중에 출력되므로 그 순서에 따라 저장).For a more specific example, in FIG. 3 , packets 1 and 2 input to the first thread 112a, packets 3 and 4 input to the second thread 112b, and packets 3 and 4 input to the third thread 112c Packet (3), packets (6, 8) input to the fourth thread (112d), and packets (7, 9) input to the fifth thread (112e) are output and divided into respective threads according to the order in which they are output. stored in the storage space 121 (for example, as shown in FIG. 9(a), in the first thread 112a, packet 1 is output first and packet 2 is output later, so the order save accordingly).

즉, 상기 패킷 수집 단계(S110)에서, 상기 패킷 수집부(110)는 멀티 쓰레드(112)로 동시에 인입되는 다량의 트래픽을 처리하고 저장하게 된다. 이때, 상기 트래픽은 물리적인 네트워크 인터페이스 카드(NIC, Network Interface Card)(111)로 유입되어, 멀티 쓰레드(112)로 순서가 보장되지 않고 인입될 수 있다. 또한, 상기 네트워크 인터페이스 카드(111)에서는 네트워크의 각 흐름(Flow), 예를 들어 패킷의 소스(Source) IP, 목적(Destination) IP, 프로토콜(Protocol), 소스(Source) Port, 목적(Destination) Port의 값이 동일한 패킷은 동일한 쓰레드로 전달하여 처리할 수 있다. That is, in the packet collecting step ( S110 ), the packet collecting unit 110 processes and stores a large amount of traffic simultaneously coming into the multi-thread 112 . At this time, the traffic flows into the physical Network Interface Card (NIC) 111 and may flow into the multi-thread 112 without being guaranteed in order. In addition, in the network interface card 111, each flow of the network, for example, the source (Source) IP, destination (Destination) IP, protocol (Protocol), source (Source) Port, destination (Destination) Packets with the same port value can be delivered to the same thread for processing.

이때, 상기 멀티 쓰레드(112)의 각 쓰레드에서는 입력되는 패킷을 순차 처리하여 입력된 순서에 따라 출력하게 된다.At this time, each thread of the multi-thread 112 sequentially processes input packets and outputs them according to the input order.

또한, 상기 패킷 수집 단계(S110)에서, 상기 패킷 수집부(110)는 각 쓰레드에 대하여 패킷을 저장하기 위한 저장 공간(121)을 패킷 관리부(120)로 요청하여 할당받을 수 있다. Also, in the packet collecting step ( S110 ), the packet collecting unit 110 may request and allocate a storage space 121 for storing packets for each thread to the packet management unit 120 .

이에 따라, 동일한 쓰레드에서 수집된 패킷들은 순서가 보장되며, 보장된 순서의 패킷들은 할당 받은 저장 공간(121)의 여유가 존재하는 시점까지 저장된다. 또한, 저장 공간(121)이 부족하게 되면 상기 저장 공간(121)을 패킷 관리부(120)에 반환하고 새로운 저장 공간(121)을 요청하여 할당 받을 수 있다.Accordingly, the order of packets collected in the same thread is guaranteed, and the packets in the guaranteed order are stored until the time when there is a margin of the allocated storage space 121. In addition, when the storage space 121 is insufficient, the storage space 121 may be returned to the packet management unit 120 and a new storage space 121 may be requested and allocated.

이때, 상기 패킷 수집 단계(S110)에서, 상기 패킷 수집부(110)는 상기 패킷을 저장하고자 하는 쓰레드에 대한 저장 공간의 할당 여부를 판단하여, 할당되지 않은 경우에는 저장 공간을 요청하여 할당받을 수 있다.At this time, in the packet collecting step (S110), the packet collecting unit 110 determines whether or not the storage space is allocated for the thread to store the packet, and if it is not allocated, the storage space can be requested and allocated. there is.

또한, 상기 패킷 수집 단계(S110)에서, 상기 패킷 수집부(110)는 할당된 저장 공간(121)의 여유 상태를 확인하여 부족한 경우 상기 할당된 저장 공간(121)을 반환한 후, 필요한 저장 공간(121)을 요청하여 할당받을 수 있다.In addition, in the packet collecting step (S110), the packet collecting unit 110 checks the free state of the allocated storage space 121 and returns the allocated storage space 121 if it is insufficient, and then the required storage space It can be assigned by requesting (121).

보다 구체적으로, 도 5에서는 본 발명의 일 실시예에 따른 네트워크 장비(100)에서의 저장 공간 할당을 설명하는 순서도를 도시하고 있다.More specifically, FIG. 5 illustrates a flow chart illustrating storage space allocation in network equipment 100 according to an embodiment of the present invention.

도 5에서 볼 수 있는 바와 같이, C11에서는 트래픽이 유입되어 처리되는 과정을 도시하고 있다. 이에 따라, 먼저 네트워크 인터페이스 카드(111)로 트래픽이 유입되면(S410), 상기 트래픽은 멀티 쓰레드(112)에서 분산되어 처리된다(S420).As can be seen in FIG. 5, C11 shows a process in which traffic is introduced and processed. Accordingly, when traffic first flows into the network interface card 111 (S410), the traffic is distributed and processed in the multi-thread 112 (S420).

또한, C12에서는 저장 공간(121)을 요청/반환하고 패킷을 상기 저장 공간(121)에 저장하는 과정을 도시하고 있다.Also, C12 shows a process of requesting/returning the storage space 121 and storing packets in the storage space 121.

보다 구체적으로, 상기 패킷 수집부(110)에서는, 각 쓰레드 별 저장 공간(121)을 확인한다(S430).More specifically, the packet collector 110 checks the storage space 121 for each thread (S430).

이때, 상기 저장 공간(121)이 할당되어 있는 경우에는 각 쓰레드의 저장 공간(121)에서 남은 크기를 확인한다(S440).At this time, if the storage space 121 is allocated, the remaining size of the storage space 121 of each thread is checked (S440).

이때, 상기 각 쓰레드의 저장 공간(121)에서 남은 크기가 미리 정해진 기준치보다 커서 충분하다면 패킷을 저장(S480)하게 되고, 반면 부족하다면 상기 저장 공간(121)을 반환(S450)한 후, 새로운 저장 공간(121)을 패킷 관리부(120)로 요청하게 된다(S460).At this time, if the size remaining in the storage space 121 of each thread is larger than a predetermined reference value and is sufficient, the packet is stored (S480), whereas if it is insufficient, the storage space 121 is returned (S450), and a new storage space is returned (S450). The space 121 is requested to the packet management unit 120 (S460).

이어서, 상기 패킷 관리부(120)에서는 저장 공간(121)을 할당하여 상기 패킷 수집부(110)로 제공하게 된다(S470). 이에 따라, 상기 패킷 수집부(110)에서는 새로이 할당된 저장 공간(121)에 패킷을 저장하게 된다(S480).Next, the packet management unit 120 allocates the storage space 121 and provides it to the packet collection unit 110 (S470). Accordingly, the packet collecting unit 110 stores the packet in the newly allocated storage space 121 (S480).

또한, 도 6에서는 본 발명의 일 실시예에 따른 네트워크 장비(100)에서의 저장 공간(121)의 구성을 예시하고 있다.6 illustrates the configuration of the storage space 121 in the network equipment 100 according to an embodiment of the present invention.

먼저, 도 6(a)에서 볼 수 있는 바와 같이, 상기 저장 공간(121)은 각 쓰레드의 상태(예를 들어, 활성/비활성)를 나타내는 쓰레드 상태 정보(122a)와 상기 각 쓰레드에서 출력되는 패킷에 대한 정보를 저장하는 패킷 정보(122b)를 포함할 수 있다.First, as can be seen in FIG. 6(a), the storage space 121 includes thread state information 122a indicating the state (eg, active/inactive) of each thread and packets output from each thread. It may include packet information (122b) for storing information about.

또한, 도 6(b)에서 볼 수 있는 바와 같이, 상기 패킷 정보(122b)는 다음 저장 공간(예를 들어, 도 6(b)에서 121a의 다음 저장 공간(122b)의 주소)와 할당된 쓰레드의 ID(고유 식별자), 저장 공간(121)의 상태(예를 들어, 미사용 상태 / 패킷 수집부(110)에서 사용하는 상태 / 패킷 처리부(130)에서 사용하는 상태), 저장 공간(121)의 총 크기와 현재 사용 중인 크기를 포함할 수 있으며, 특히 패킷과 상기 패킷의 유입 시간을 포함하는 데이터 정보를 포함할 수 있다.Also, as can be seen in FIG. 6(b), the packet information 122b includes the next storage space (eg, the address of the next storage space 122b of 121a in FIG. 6(b)) and the assigned thread. of ID (unique identifier), the state of the storage space 121 (eg, unused state / state used by the packet collection unit 110 / state used by the packet processing unit 130), of the storage space 121 It may include the total size and the currently used size, and in particular, data information including the packet and the arrival time of the packet.

또한, 상기 패킷 관리 단계(S120)에서, 상기 패킷 관리부(120)는 상기 패킷을 저장할 수 있는 저장 공간(121)을 할당하여 제공하거나 반환받아 관리하게 된다.In addition, in the packet management step (S120), the packet management unit 120 allocates and provides a storage space 121 capable of storing the packet, or returns and manages the storage space 121.

이때, 상기 패킷 관리 단계(S120)에서는 상기 저장 공간(121)을 각 쓰레드 별로 나누어 상기 각 쓰레드에서 출력되는 패킷을 저장하도록 할 수 있다.At this time, in the packet management step (S120), the storage space 121 may be divided for each thread to store packets output from each thread.

이에 따라, 상기 패킷 관리부(120)에서는 패킷을 저장할 수 있는 저장 공간(121)을 할당하고, 상기 패킷 수집부(110)의 요청에 의해 저장 공간(121)을 제공하는 역할을 한다. 또한, 반환된 저장 공간(121)을 재사용할 수 있도록 관리한다.Accordingly, the packet management unit 120 serves to allocate a storage space 121 capable of storing packets and to provide the storage space 121 at the request of the packet collecting unit 110 . In addition, the returned storage space 121 is managed so that it can be reused.

보다 구체적으로, 도 7에서는 본 발명의 일 실시예에 따른 네트워크 장비(100)에서의 패킷 관리부(120)의 구체적인 동작을 예시하는 순서도를 도시하고 있다.More specifically, FIG. 7 illustrates a flowchart illustrating specific operations of the packet management unit 120 in the network equipment 100 according to an embodiment of the present invention.

도 7에서 볼 수 있는 바와 같이, 먼저 상기 패킷 관리부(120)에서는 요청의 종류를 판단하게 된다(S610).As can be seen in FIG. 7, the packet management unit 120 first determines the type of request (S610).

이에 따라, 상기 요청이 저장 공간(121) 할당에 대한 요청인 경우에는 도 7의 C21으로 처리하게 되고, 저장 공간(121) 반환에 대한 요청인 경우에는 도 7의 C22로 처리하게 된다.Accordingly, if the request is for allocating the storage space 121, it is processed in C21 of FIG. 7, and if it is a request for returning the storage space 121, it is processed in C22 of FIG.

이에 따라, 상기 패킷 관리부(120)에서 저장 공간 제공 요청을 확인하면(S620), 전달 가능한 저장 공간의 크기를 확인하여(S630) 미리 정해진 기준치보다 커서 충분하다면 해당 쓰레드로 저장 공간(121)을 전달(S640)하게 되고, 반면 부족하다면 저장 공간(121)을 확보하여 제공하게 된다(S650).Accordingly, when the packet management unit 120 confirms the storage space provision request (S620), the size of the transferable storage space is checked (S630), and if it is larger than a predetermined reference value and is sufficient, the storage space 121 is transferred to the corresponding thread. (S640) and, on the other hand, if insufficient, the storage space 121 is secured and provided (S650).

반면, 상기 패킷 관리부(120)에서 저장 공간 반환 요청을 확인하면(S660), 생성된 저장 공간(121)의 마지막 위치를 확인한 후(S670), 상기 마지막 위치에 반환된 저장 공간(121)을 연결하여 관리하게 된다(S680).On the other hand, when the packet management unit 120 confirms the storage space return request (S660), the last location of the created storage space 121 is checked (S670), and then the returned storage space 121 is connected to the last location. and managed (S680).

또한, 도 8에서는 본 발명의 일 실시예에 따른 네트워크 장비(100)에서 패킷 관리부(120)의 저장 공간(121)의 구조를 예시하고 있다.8 illustrates the structure of the storage space 121 of the packet management unit 120 in the network equipment 100 according to an embodiment of the present invention.

도 8에서 볼 수 있는 바와 같이, 상기 패킷 관리부(120)에서는 저장 공간(121)을 관리하기 위한 패킷 저장 관리 구조(123)를 사용할 수 있다.As shown in FIG. 8 , the packet management unit 120 may use the packet storage management structure 123 for managing the storage space 121 .

보다 구체적으로, 도 8에 도시된 바와 같이, 상기 패킷 저장 관리 구조(123)에는 최대 저장 공간(121)의 수, 생성된 저장 공간(121)의 수, 사용중인 저장 공간(121)의 수, 미사용 중인 저장 공간(121)의 수, 멀티 쓰레드(112)의 수, 쓰레드 별 관리 자료구조(123a) 및 저장 공간 관리 자료구조(123b) 영역이 포함될 수 있다.More specifically, as shown in FIG. 8, the packet storage management structure 123 includes the maximum number of storage spaces 121, the number of created storage spaces 121, the number of storage spaces 121 in use, The number of unused storage spaces 121, the number of multi-threads 112, the thread-specific management data structure 123a, and the storage space management data structure 123b area may be included.

이때, 도 8에서 볼 수 있는 바와 같이, 상기 쓰레드 별 관리 자료구조(123a)에는 각 쓰레드에 할당된 쓰레드 할당 자료구조(124a, 124b, 124c)들이 순차 연결될 수 있으며, 이때 상기 각 쓰레드에서는 상기 쓰레드 할당 자료구조(124a, 124b, 124c)를 각자 관리하면서 동작하게 된다.At this time, as can be seen in FIG. 8, the thread allocation data structures 124a, 124b, and 124c allocated to each thread may be sequentially connected to the thread-specific management data structure 123a. It operates while managing the allocation data structures 124a, 124b, and 124c respectively.

또한, 상기 저장 공간 관리 자료구조(123b)는, 도 8에서 볼 수 있는 바와 같이, 상기 각 쓰레드에 할당된 저장 공간 내에서 저장 공간 (head)로부터 (used), (curPosition)을 거쳐 (tail)까지 순차 연결하여 관리하게 된다.In addition, as can be seen in FIG. 8, the storage space management data structure 123b, within the storage space allocated to each thread, from the storage space (head) through (used) and (curPosition) to (tail) It is sequentially connected and managed.

이에 따라, 상기 패킷 관리부(120)에서는 저장 공간(121)을 제공하거나 반환하면서 각 쓰레드 별로 효율적으로 관리할 수 있게 된다.Accordingly, the packet management unit 120 can efficiently manage each thread while providing or returning the storage space 121 .

또한, 상기 패킷 처리 단계(S130)에서, 상기 패킷 처리부(130)에서는 상기 저장 공간(121)에 저장된 패킷을 상기 수집된 순서에 따라 처리하거나 저장하게 된다.In addition, in the packet processing step (S130), the packet processing unit 130 processes or stores the packets stored in the storage space 121 according to the collected order.

보다 구체적으로, 상기 패킷 처리 단계(S130)에서는, 상기 저장 공간(121)에 각 쓰레드 별로 남아있는 패킷 중 가장 먼저 출력된 패킷들의 패킷 유입 시간을 비교하여 상기 패킷을 처리하거나 저장하는 순서를 산출할 수 있다.More specifically, in the packet processing step (S130), the order of processing or storing the packets is calculated by comparing packet entry times of packets output first among packets remaining in the storage space 121 for each thread. can

이에 따라, 상기 패킷 처리부(130)에서는 상기 패킷 관리부(120)에서 관리하는 저장 공간(121)에 각 쓰레드 별로 저장된 패킷의 유입 시간을 식별하여 저장 공간(121)에 저장된 전체 패킷 중 가장 빠른 유입 시간의 패킷을 산출하여 처리를 수행한다.Accordingly, the packet processing unit 130 identifies the arrival time of packets stored for each thread in the storage space 121 managed by the packet management unit 120, and the fastest arrival time among all packets stored in the storage space 121. A packet of is calculated and processed.

보다 구체적으로, 도 9에서는 본 발명의 일 실시예에 따른 네트워크 장비(100)에서 패킷 처리 단계(S130)의 동작을 설명하는 도면을 도시하고 있다.More specifically, FIG. 9 illustrates a diagram for explaining the operation of the packet processing step (S130) in the network equipment 100 according to an embodiment of the present invention.

도 9에서 볼 수 있는 바와 같이, 상기 패킷 처리부(130)에서는 멀티 쓰레드(112)의 M개의 쓰레드가 사용하는 저장 공간들을 개별로 관리하여, 상기 저장 공간의 전체 N개의 패킷을 모두 비교하지 않고, M 개의 패킷 만을 비교하여 유입 시간이 가장 빠른 패킷을 산출할 수 있다. As can be seen in FIG. 9, the packet processing unit 130 individually manages storage spaces used by M threads of the multi-thread 112, and does not compare all N packets in the storage space, By comparing only M packets, a packet having the fastest arrival time can be calculated.

즉, 상기 패킷 처리부(130)에서는 M개의 각 쓰레드에 대하여 가장 먼저 입력되어 처리되고 출력된 M개의 패킷 만을 비교하여 전체 저장된 패킷 중 가장 유입 시간이 빠른 패킷을 산출할 수 있다.That is, the packet processing unit 130 may compare only the first M packets input, processed, and output for each M thread to calculate a packet having the fastest incoming time among all stored packets.

보다 구체적인 예를 들어, 도 9(a)에서 볼 수 있는 바와 같이 패킷(1), 패킷(3), 패킷(5), 패킷(6), 패킷(7) 만을 비교하여 이중 패킷 유입 시간이 가장 빠른 패킷(1)을 산출하고, 이어서 도 9(b)에서 볼 수 있는 바와 같이 패킷(2), 패킷(3), 패킷(5), 패킷(6), 패킷(7) 만을 비교하여 이중 패킷 유입 시간이 가장 빠른 패킷(2)을 산출하게 된다.For a more specific example, as shown in FIG. 9(a), only packet 1, packet 3, packet 5, packet 6, and packet 7 are compared, and the double packet inflow time is the highest. The fast packet 1 is calculated, and then, as shown in FIG. 9(b), only the packet 2, packet 3, packet 5, packet 6, and packet 7 are compared to double packets. A packet (2) having the fastest entry time is calculated.

이러한 과정을 반복하여 결국 상기 수집된 패킷이 멀티 쓰레드(112)를 거쳐 상기 저장 공간(121)에 저장된 각 패킷을 다시 수집된 순서에 따라 처리하거나 저장할 수 있게 된다.By repeating this process, the collected packets go through the multi-thread 112 and each packet stored in the storage space 121 can be processed or stored again according to the collected order.

또한, 상기 패킷 처리부(130)에서 사용 완료된 저장 공간(121)은 상기 패킷 관리부(120)로 반환된다. 이때, 상기 저장 공간(121) 내에 저장되어 있는 패킷은 모두 처리되어야 하며(도 9의 (a) 내지 (f)), 상기 저장 공간(121)은 초기화된 상태로 반환하게 된다.In addition, the storage space 121 used by the packet processing unit 130 is returned to the packet management unit 120 . At this time, all packets stored in the storage space 121 must be processed ((a) to (f) of FIG. 9), and the storage space 121 is returned to an initialized state.

나아가, 본 발명의 일 실시예에 따른 네트워크 장비(100)에서의 패킷 프로세싱 방법, 장치 및 컴퓨터 프로그램에서는, 상기 패킷 수집 단계(S110)에서 상기 패킷이 멀티 쓰레드 보안 엔진으로 분산되어 처리될 수 있으며, 이에 따라 상기 패킷 처리 단계(S130)에서는 미리 정해진 분량의 패킷을 상기 수집된 순서에 따라 정렬하여 저장할 수 있다. Furthermore, in the packet processing method, device, and computer program in the network equipment 100 according to an embodiment of the present invention, the packet may be distributed and processed by a multi-threaded security engine in the packet collection step (S110), Accordingly, in the packet processing step (S130), packets of a predetermined amount may be sorted and stored according to the collected order.

이에 따라, 본 발명의 일 실시예에 따른 네트워크 장비(100)는 관리자 등에 의하여 미리 정해진 분량의 패킷의 인입 순서를 보장하면서 저장하여 다양한 보안 분석 용도로 사용하거나 인과 관계 분석 등을 통해 트래픽의 특이점 등을 검출하는데 사용될 수 있으나, 본 발명이 반드시 이에 한정되는 것은 아니다.Accordingly, the network equipment 100 according to an embodiment of the present invention guarantees the incoming order of a predetermined amount of packets by an administrator, etc. and stores them for various security analysis purposes, or analyzes causal relationships to identify traffic singularities, etc. It can be used to detect, but the present invention is not necessarily limited thereto.

또한, 본 발명의 또 다른 측면에 따른 컴퓨터 프로그램은 앞서 살핀 네트워크 장비(100)에서의 패킷 프로세싱 방법의 각 단계를 컴퓨터에서 실행시키기 위하여 컴퓨터로 판독 가능한 매체에 저장된 컴퓨터 프로그램인 것을 특징으로 한다. 상기 컴퓨터 프로그램은 컴파일러에 의해 만들어지는 기계어 코드를 포함하는 컴퓨터 프로그램뿐만 아니라, 인터프리터 등을 사용해서 컴퓨터에서 실행될 수 있는 고급 언어 코드를 포함하는 컴퓨터 프로그램일 수도 있다. 이때, 상기 컴퓨터로서는 퍼스널 컴퓨터(PC)나 노트북 컴퓨터 등에 한정되지 아니하며, 서버, 스마트폰, 태블릿 PC, PDA, 휴대전화 등 중앙처리장치(CPU)를 구비하여 컴퓨터 프로그램을 실행할 수 있는 일체의 정보처리 장치를 포함한다.In addition, the computer program according to another aspect of the present invention is characterized in that it is a computer program stored in a computer readable medium in order to execute each step of the packet processing method in the salpin network equipment 100 in the computer. The computer program may be a computer program including machine code generated by a compiler, as well as a computer program including high-level language code that can be executed on a computer using an interpreter or the like. At this time, the computer is not limited to a personal computer (PC) or a notebook computer, etc., and has a central processing unit (CPU) such as a server, smart phone, tablet PC, PDA, mobile phone, etc. to execute a computer program. All information processing include the device

또한, 상기 컴퓨터로 판독 가능한 매체는 컴퓨터로 실행 가능한 프로그램을 계속 저장하거나, 실행 또는 다운로드를 위해 임시 저장하는 것일 수도 있다. 또한, 매체는 단일 또는 수개 하드웨어가 결합된 형태의 다양한 기록수단 또는 저장수단일 수 있는데, 어떤 컴퓨터 시스템에 직접 접속되는 매체에 한정되지 않고, 네트워크 상에 분산 존재하는 것일 수도 있다. 매체의 예시로는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium), 및 ROM, RAM, 플래시 메모리 등을 포함하여 프로그램 명령어가 저장되도록 구성된 것이 있을 수 있다. 또한, 다른 매체의 예시로, 애플리케이션을 유통하는 앱 스토어나 기타 다양한 소프트웨어를 공급 내지 유통하는 사이트, 서버 등에서 관리하는 기록매체 내지 저장매체도 들 수 있다.In addition, the computer-readable medium may continuously store a computer-executable program or temporarily store it for execution or download. In addition, the medium may be various recording means or storage means in the form of a single or combined hardware, but is not limited to a medium directly connected to a certain computer system, and may be distributed on a network. Examples of the medium include magnetic media such as hard disks, floppy disks and magnetic tapes, optical recording media such as CD-ROM and DVD, magneto-optical media such as floptical disks, and ROM, RAM, flash memory, etc. configured to store program instructions. In addition, examples of other media include recording media or storage media managed by an app store that distributes applications, a site that supplies or distributes various other software, and a server.

이에 따라, 본 발명의 일 실시예에 따른 네트워크 장비(100)에서의 패킷 프로세싱 방법, 장치 및 컴퓨터 프로그램은, 대용량 네트워크 트래픽을 처리하기 위하여 멀티 쓰레드(112)를 사용하는 네트워크 장비(100)에서 패킷을 처리하거나 저장하는 순서를 보장할 수 있게 된다.Accordingly, a packet processing method, device, and computer program in the network equipment 100 according to an embodiment of the present invention are packet packets in the network equipment 100 using the multi-thread 112 to process large-capacity network traffic. The order of processing or storing can be guaranteed.

또한, 본 발명의 일 실시예에 따른 네트워크 장비(100)에서의 패킷 프로세싱 방법, 장치 및 컴퓨터 프로그램에서는, 패킷을 인입 순서에 따라 처리하면서도 이를 구현하는 과정에서 나타날 수 있는 네트워크 장비(100)에서의 성능 저하 및 패킷 유실 등의 문제도 효과적으로 방지할 수 있게 된다.In addition, in the packet processing method, device, and computer program in the network equipment 100 according to an embodiment of the present invention, while processing the packets according to the incoming order, in the network equipment 100 that may appear in the process of implementing them Problems such as performance degradation and packet loss can also be effectively prevented.

이상의 설명은 본 발명의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서 본 발명에 기재된 실시예들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 한정되는 것은 아니다. 본 발명의 보호 범위는 아래의 청구범위에 의해서 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely an example of the technical idea of the present invention, and various modifications and variations can be made to those skilled in the art without departing from the essential characteristics of the present invention. Therefore, the embodiments described in the present invention are not intended to limit the technical spirit of the present invention, but to explain, and are not limited to these embodiments. The protection scope of the present invention should be construed by the following claims, and all technical ideas within the equivalent range should be construed as being included in the scope of the present invention.

100 : 네트워크 장비
110 : 패킷 수집부
111 : 네트워크 인터페이스 카드
112 : 멀티 쓰레드
112a, 112b, 112c, 112d, 112e, 112n : 쓰레드
113 : 버퍼
114 : 출력
120 : 패킷 관리부
121, 121a, 121b, 121c : 저장 공간
122a : 쓰레드 상태 정보
122b : 패킷 정보
123 : 패킷 저장 관리 구조
123a : 쓰레드 별 관리 자료구조
123b : 저장 공간 관리 자료구조
124a, 124b, 124c : 쓰레드 할당 자료구조
130 : 패킷 처리부
100: network equipment
110: packet collecting unit
111: network interface card
112: multi-thread
112a, 112b, 112c, 112d, 112e, 112n: thread
113: buffer
114: output
120: packet management unit
121, 121a, 121b, 121c: storage space
122a: thread state information
122b: packet information
123: packet storage management structure
123a: management data structure for each thread
123b: storage space management data structure
124a, 124b, 124c: thread allocation data structure
130: packet processing unit

Claims (10)

네트워크 장비에서 패킷을 처리하거나 저장하는 방법에 있어서,
패킷을 수집하여 복수의 쓰레드를 가지는 멀티 쓰레드로 분산해 처리한 후 저장 공간에 저장하는 패킷 수집 단계; 및
상기 저장 공간에 저장된 패킷을 상기 수집된 순서에 따라 처리하거나 저장하는 패킷 처리 단계;를 포함하며,
상기 저장 공간에는 상기 패킷 및 상기 패킷이 상기 멀티 쓰레드로 유입되는 패킷 유입 시간이 매칭되어 저장되고,
상기 패킷 수집 단계에서는,
순차 유입되는 패킷을 미리 정해진 규칙에 따라 나누어 멀티 쓰레드로 분산해 처리하면서,
각 쓰레드 별로 나누어 상기 각 쓰레드에서 처리되어 출력되는 순서에 따라 상기 패킷을 상기 저장 공간에 저장하고,
상기 패킷 처리 단계에서는,
상기 저장 공간에 각 쓰레드 별로 남아있는 패킷 중 가장 먼저 출력된 패킷들의 패킷 유입 시간을 비교하여 상기 수집된 순서에 따라 상기 패킷을 처리하거나 저장하는 순서를 산출하는 것을 특징으로 하는 네트워크 장비에서의 패킷 프로세싱 방법.
In the method of processing or storing packets in network equipment,
a packet collection step of collecting packets, distributing and processing them into multi-threads having a plurality of threads, and then storing the packets in a storage space; and
A packet processing step of processing or storing packets stored in the storage space according to the collected order;
In the storage space, the packet and the packet inflow time when the packet flows into the multi-thread are matched and stored;
In the packet collection step,
While dividing sequentially incoming packets according to predetermined rules and distributing and processing them in multi-threads,
storing the packets in the storage space according to the order in which they are divided for each thread and processed and output in each thread;
In the packet processing step,
Packet processing in network equipment, characterized in that for calculating the order of processing or storing the packets according to the collected order by comparing the packet inflow time of the packets output first among the packets remaining for each thread in the storage space method.
제1항에 있어서,
상기 패킷을 저장할 수 있는 저장 공간을 할당하여 제공하거나 반환받아 관리하는 패킷 관리 단계;를 더 포함하는 것을 특징으로 하는 네트워크 장비에서의 패킷 프로세싱 방법.
According to claim 1,
A packet processing method in network equipment, characterized in that it further comprises; a packet management step of allocating and providing, or returning, and managing a storage space capable of storing the packet.
제2항에 있어서,
상기 패킷 관리 단계에서는,
상기 저장 공간을 각 쓰레드 별로 나누어 상기 각 쓰레드에서 출력되는 패킷을 저장하는 것을 특징으로 하는 네트워크 장비에서의 패킷 프로세싱 방법.
According to claim 2,
In the packet management step,
A packet processing method in network equipment, characterized in that the storage space is divided for each thread and packets output from each thread are stored.
삭제delete 삭제delete 삭제delete 제1항에 있어서,
상기 패킷 수집 단계에서는,
상기 패킷이 멀티 쓰레드 보안 엔진으로 분산되어 처리되며,
상기 패킷 처리 단계에서는,
미리 정해진 분량의 패킷을 상기 수집된 순서에 따라 정렬하여 저장하는 것을 특징으로 하는 네트워크 장비에서의 패킷 프로세싱 방법.
According to claim 1,
In the packet collection step,
The packet is distributed and processed by a multi-threaded security engine;
In the packet processing step,
A packet processing method in a network equipment, characterized in that for storing a predetermined amount of packets in the collected order.
제1항에 있어서,
상기 패킷 수집 단계에서는,
상기 패킷을 저장하고자 하는 쓰레드에 대한 저장 공간의 할당 여부를 판단하여,
할당되지 않은 경우에는 저장 공간을 요청하여 할당받는 것을 특징으로 하는 네트워크 장비에서의 패킷 프로세싱 방법.
According to claim 1,
In the packet collection step,
Determining whether to allocate storage space for a thread to store the packet,
A packet processing method in network equipment, characterized in that when it is not allocated, the storage space is requested and allocated.
제7항에 있어서,
상기 패킷 수집 단계에서는,
할당된 저장 공간의 여유 상태를 확인하여 부족한 경우 상기 할당된 저장 공간을 반환한 후, 필요한 저장 공간을 요청하여 할당받는 것을 특징으로 하는 네트워크 장비에서의 패킷 프로세싱 방법.
According to claim 7,
In the packet collection step,
A packet processing method in network equipment characterized by checking the free state of the allocated storage space, returning the allocated storage space if it is insufficient, and then requesting and allocating the required storage space.
패킷을 수집하여 복수의 쓰레드를 가지는 멀티 쓰레드로 분산해 처리한 후 저장 공간에 저장하는 패킷 수집부; 및
상기 저장 공간에 저장된 패킷을 상기 수집된 순서에 따라 처리하거나 저장하는 패킷 처리부;를 포함하며,
상기 저장 공간에는 상기 패킷 및 상기 패킷이 상기 멀티 쓰레드로 유입되는 패킷 유입 시간이 매칭되어 저장되고,
상기 패킷 수집부에서는,
순차 유입되는 패킷을 미리 정해진 규칙에 따라 나누어 멀티 쓰레드로 분산해 처리하면서,
각 쓰레드 별로 나누어 상기 각 쓰레드에서 처리되어 출력되는 순서에 따라 상기 패킷을 상기 저장 공간에 저장하고,
상기 패킷 처리부에서는,
상기 저장 공간에 각 쓰레드 별로 남아있는 패킷 중 가장 먼저 출력된 패킷들의 패킷 유입 시간을 비교하여 상기 수집된 순서에 따라 상기 패킷을 처리하거나 저장하는 순서를 산출하는 것을 특징으로 하는 네트워크 장비.
a packet collecting unit that collects packets, distributes and processes them into multi-threads having a plurality of threads, and then stores the packets in a storage space; and
A packet processor configured to process or store the packets stored in the storage space according to the collected order;
In the storage space, the packet and the packet inflow time of the packet inflow to the multi-thread are matched and stored;
In the packet collecting unit,
While dividing sequentially incoming packets according to predetermined rules and distributing and processing them in multi-threads,
storing the packets in the storage space according to the order in which they are divided for each thread and processed and output in each thread;
In the packet processing unit,
The network equipment according to claim 1 , wherein an order of processing or storing the packets is calculated according to the collected order by comparing packet inflow times of packets output first among packets remaining for each thread in the storage space.
KR1020210024744A 2021-02-24 2021-02-24 Method, apparauts and computer program for processing packet in network equipment KR102503272B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210024744A KR102503272B1 (en) 2021-02-24 2021-02-24 Method, apparauts and computer program for processing packet in network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210024744A KR102503272B1 (en) 2021-02-24 2021-02-24 Method, apparauts and computer program for processing packet in network equipment

Publications (2)

Publication Number Publication Date
KR20220120939A KR20220120939A (en) 2022-08-31
KR102503272B1 true KR102503272B1 (en) 2023-02-24

Family

ID=83061670

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210024744A KR102503272B1 (en) 2021-02-24 2021-02-24 Method, apparauts and computer program for processing packet in network equipment

Country Status (1)

Country Link
KR (1) KR102503272B1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100473304B1 (en) * 1995-08-10 2005-05-16 컴퓨터 어소시에이츠 싱크, 인코포레이티드 Response time measurement apparatus and method
WO2016162828A1 (en) 2015-04-08 2016-10-13 Telefonaktiebolaget Lm Ericsson (Publ) Method and system for burst based packet processing

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100438861B1 (en) * 2001-09-06 2004-07-05 오정석 Transmitting server having apparatus for managing memory and method thereof
KR20130141326A (en) * 2012-05-11 2013-12-26 주식회사 윈스테크넷 Network data fast analysis method and fast analysis system
KR101463783B1 (en) * 2012-12-27 2014-11-28 주식회사 시큐아이 Packet processing device and method thereof
KR101814368B1 (en) 2017-07-27 2018-01-04 김재춘 Information security network integrated management system using big data and artificial intelligence, and a method thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100473304B1 (en) * 1995-08-10 2005-05-16 컴퓨터 어소시에이츠 싱크, 인코포레이티드 Response time measurement apparatus and method
WO2016162828A1 (en) 2015-04-08 2016-10-13 Telefonaktiebolaget Lm Ericsson (Publ) Method and system for burst based packet processing

Also Published As

Publication number Publication date
KR20220120939A (en) 2022-08-31

Similar Documents

Publication Publication Date Title
CN108537543B (en) Parallel processing method, device, equipment and storage medium for blockchain data
US8589923B2 (en) Preprovisioning virtual machines based on request frequency and current network configuration
US11558244B2 (en) Improving performance of multi-processor computer systems
US7376953B2 (en) Apparatus and method for routing a transaction to a server
JP5336094B2 (en) Multipurpose allocation of computing jobs in client / server or hosting environments
US8701108B2 (en) Apparatus and method for controlling live-migrations of a plurality of virtual machines
US8869160B2 (en) Goal oriented performance management of workload utilizing accelerators
US7810099B2 (en) Optimizing workflow execution against a heterogeneous grid computing topology
WO2012066640A1 (en) Computer system, migration method, and management server
US20140317620A1 (en) Host selection for virtual machine placement
CN104539708B (en) A kind of capacity reduction method, device and the system of cloud platform resource
US20100042723A1 (en) Method and system for managing load in a network
CN106170947A (en) A kind of alarm information processing method, relevant device and system
Emeakaroha et al. Managing and optimizing bioinformatics workflows for data analysis in clouds
US7743140B2 (en) Binding processes in a non-uniform memory access system
US7631125B2 (en) Dynamically migrating channels
CN115840621A (en) Interaction method and related device of multi-core system
KR102503272B1 (en) Method, apparauts and computer program for processing packet in network equipment
JP5186555B2 (en) Method, apparatus and computer program for implementing bandwidth capping at the logical port level for a shared Ethernet port
CN109032812A (en) A kind of mobile terminal and its method for limiting, the storage medium of interprocess communication
US8589551B2 (en) Multiprocessor computer and network computing system processing use and provision of hardware resource via a network
CN112822306A (en) Proxy IP dynamic management method, device and computer readable storage medium
CN107888696A (en) One kind storage laboratory equipment information acquisition method, system and relevant apparatus
CN111367875B (en) Ticket file processing method, system, equipment and medium
WO2013018289A1 (en) Computer and performance data collection method

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant