KR100899526B1 - Apparatus and Method for Processing Packet using Multi-Processor - Google Patents
Apparatus and Method for Processing Packet using Multi-Processor Download PDFInfo
- Publication number
- KR100899526B1 KR100899526B1 KR1020070091078A KR20070091078A KR100899526B1 KR 100899526 B1 KR100899526 B1 KR 100899526B1 KR 1020070091078 A KR1020070091078 A KR 1020070091078A KR 20070091078 A KR20070091078 A KR 20070091078A KR 100899526 B1 KR100899526 B1 KR 100899526B1
- Authority
- KR
- South Korea
- Prior art keywords
- packet
- queue
- packets
- processor
- queues
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/02—Capturing of monitoring data
- H04L43/028—Capturing of monitoring data by filtering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/58—Association of routers
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
다중 프로세서 라우터에서 패킷 스케줄러에 의해 스케줄링된 패킷을 복수개의 큐에 저장하고 이 저장된 패킷을 각 프로세서가 처리하는 방법 및 장치가 개시된다. 이를 위하여, 본 발명에 따른 다중 프로세서 기반의 패킷 처리 방법은, 패킷 스케줄러가 입력되는 패킷을 세션(session)에 기반하여 복수개의 큐에 각각 분배하는 단계; 및 상기 복수개의 큐에 분배된 패킷에 대해, 상기 다중 프로세서 중 하나의 프로세서가 자신에게 할당된 제1 큐의 패킷을 다 처리한 후, 상기 다중 프로세서 중 다른 하나의 프로세서에 할당된 제2 큐의 패킷을 처리하는 단계를 포함한다. 한편, 다중 프로세서 기반의 패킷 처리 장치는, 입력되는 패킷을 세션(session)에 기반하여 분배하도록 구성된 패킷 스케줄러와, 상기 분배된 패킷을 각각 저장하도록 구성된 복수개의 큐와, 상기 복수개의 큐와 동일한 개수로 이루어져 개별 프로세서에 할당된 큐의 패킷을 다 처리한 경우 다른 프로세서에 할당된 큐의 패킷을 처리하도록 각각 구성된 복수개의 프로세서를 포함한다. 이를 통해, 다중 프로세서 라우터에서 한 세션에 속하는 패킷들의 순차적 전달을 보장함과 동시에 프로세서의 활용도를 극대화시킬 수 있다.A method and apparatus are disclosed for storing packets scheduled by a packet scheduler in a multiprocessor router in a plurality of queues and processing each stored packet by the processor. To this end, the multiprocessor-based packet processing method according to the present invention, the packet scheduler for distributing the input packet to each of the plurality of queues based on the session (session); And for the packets distributed to the plurality of queues, after one of the multiprocessors processes the packets of the first queue allocated to the plurality of queues, the second queue allocated to the other one of the multiprocessors. Processing the packet. Meanwhile, a multiprocessor-based packet processing apparatus includes a packet scheduler configured to distribute input packets based on a session, a plurality of queues configured to store the distributed packets, and the same number as the plurality of queues. In the case of processing the packets of the queue allocated to the individual processor comprises a plurality of processors each configured to process the packets of the queue assigned to the other processor. This ensures sequential delivery of packets belonging to a session in a multiprocessor router and maximizes the utilization of the processor.
Description
본 발명은 다중 프로세서 기반의 패킷 처리 장치 및 방법에 관한 것으로, 보다 상세하게는 다중 프로세서 라우터에서 패킷 스케줄러에 의해 스케줄링된 패킷을 복수개의 큐에 분산 저장하고 이 저장된 패킷을 각 프로세서가 처리하는 장치 및 방법에 관한 것이다.The present invention relates to an apparatus and method for processing a packet based on a multiprocessor, and more particularly, to an apparatus for distributing and storing a packet scheduled by a packet scheduler in a plurality of queues in a multiprocessor router and processing the stored packet by each processor; It is about a method.
일반적으로, 다중 프로세서 라우터란 패킷 병렬 처리를 위해 복수개의 패킷 처리용 프로세서를 보유한 라우터를 의미한다. 상기 복수개의 프로세서는 입력되는 패킷에 대해 라우팅 테이블을 참조하여 어느 포트로 보낼 것인지를 각각 결정한 후, 이 결정된 포트를 통해 상기 패킷을 각각 전송한다. 이에 대해 좀 더 상세히 설명하기로 한다.In general, a multiprocessor router refers to a router having a plurality of packet processing processors for packet parallel processing. The plurality of processors respectively determine which port to send to by referring to the routing table for the incoming packet, and transmits the packet through the determined port, respectively. This will be described in more detail.
도 1은 일반적인 다중 프로세서 라우터에서의 패킷 처리 방식을 설명하는 개념도이다.1 is a conceptual diagram illustrating a packet processing scheme in a general multiprocessor router.
도 1에 도시한 바와 같이, 다중 프로세서 라우터는 입력 패킷을 라운드 로빈(Round-Robin) 방식으로 분산(분배)시키는 패킷 스케줄러(110)와, 분산된 패킷을 각각 저장하는 복수개의 큐(120a, 120b, ..., 120n)와, 상기 복수개의 큐(120a, 120b, ..., 120n)와 동일한 개수로 이루어져 자신에게 할당된 큐(120a, 120b, ..., 120n)에 저장된 패킷을 각각 처리하는 복수개의 프로세서(130a, 130b, ..., 130n)를 포함한다. 그리고, 각 프로세서(130a, 130b, ..., 130n)는 상기 패킷에 대한 정보를 저장하는 캐쉬(cache)를 포함한다.As shown in FIG. 1, the multiprocessor router includes a
패킷 스케줄러(110)에 일련의 패킷들이 입력되면, 패킷 스케줄러(110)는 이 입력 패킷들을 다중 프로세서(130a, 130b, ..., 130n)에 분산시킨다. 이러한 패킷 분산 정책은 라우터의 성능에 매우 중요한 요소이다. 패킷 분산 정책의 대표적인 예로 상술한 라운드 로빈(Round-Robin) 방식과 세션 기반 방식을 들 수 있다.When a series of packets are input to the
라운드 로빈 방식의 패킷 분산 정책은 복수개의 프로세서 각각에게 패킷을 균등하게 분배시키는 정책으로서, 각 프로세서(130a, 130b, ..., 130n)의 활용도를 높일 수 있다. 그러나, 이 방식은 동일한 세션에 속하는 패킷들에 대한 순차적인(sequential) 전달을 보장하지 못한다. 즉, 패킷 스케줄러(110)로부터 큐(120a, 120b, ..., 120n)를 통해 입력되는 패킷을 다중 프로세서(130a, 130b, ..., 130n)가 병렬적으로 처리함에 있어서 각기 처리 시간이 다를 수 있기 때문에, 동일한 세션에 속하는 패킷들이 항상 라우터에 먼저 입력된 순서대로 출력되지는 못한다.The round robin packet distribution policy is a policy for uniformly distributing packets to each of a plurality of processors, and may increase utilization of each
특히, TCP(Transmission Control Protocol) 세션의 경우 순차적인 패킷의 전달 보장은 전송 효율에 있어서 매우 중요한 요소인데, TCP 세션에서 비순차적인 패킷의 전달이 발생하는 경우, TCP는 이를 복구하기 위한 일련의 복구 알고리즘을 수행하게 되고, 이에 따라 라우터의 유효(effective) 전송 효율이 저하되는 문제점이 있다. In particular, in the case of Transmission Control Protocol (TCP) sessions, guaranteeing the sequential delivery of packets is a very important factor in transmission efficiency. When a nonsequential delivery of packets occurs in a TCP session, TCP performs a series of recovery to recover them. Algorithm is performed, and thus the effective transmission efficiency of the router is lowered.
게다가, 라운드 로빈 방식은 동일한 세션에 속하는 패킷을 다중 프로세서로 분산시켜 처리하므로 다중 프로세서의 각 캐쉬에 동일한 패킷 정보가 중복되어 저장될 수 있다. 이에 따라, 하나의 프로세서에서 상기 패킷 정보의 변경이 발생되면 다른 모든 프로세서의 캐쉬에 저장된 상기 패킷 정보가 무효화된다. 따라서, 이후에 다른 프로세서가 상기 패킷을 처리하기 위해서 패킷 정보를 읽으려면 메인 메모리로부터 다시 읽어 와야 하므로, 프로세서의 캐쉬를 비효율적으로 사용하는 문제점이 있다.In addition, since the round robin method distributes and processes packets belonging to the same session to multiple processors, the same packet information may be duplicated and stored in each cache of the multiple processors. Accordingly, when the packet information is changed in one processor, the packet information stored in the caches of all other processors is invalidated. Therefore, since another processor must read back from the main memory in order to read the packet information in order to process the packet, there is a problem of inefficient use of the processor's cache.
한편, 또 다른 패킷 분산 정책으로 세션에 기반하여 패킷을 분배하는 방식이 있다. 이는 동일한 세션에 속하는 모든 패킷들을 동일한 프로세서에 전송하여 처리하는 것이다. 통상적인 경우 입력 패킷의 송신자 IP 주소 및 수신자 IP 주소에 기반한 해쉬(Hash)값을 통해 이들 패킷을 처리할 프로세서를 결정하게 된다. 상기 세션 기반 방식은 동일한 세션에 속하는 모든 패킷을 동일한 프로세서에서 처리하게 되므로 순차적인 패킷 전달이 보장되고 또한 프로세서 캐쉬도 효율적으로 사용할 수 있다. 그러나, 세션 기반 방식은 입력 패킷이 모든 프로세서에게 균등하게 분산되지 않으므로 라운드 로빈 방식에 비해 프로세서의 활용도가 떨어지는 문제점이 있다. Meanwhile, another packet distribution policy includes a method of distributing packets based on sessions. This means that all packets belonging to the same session are sent to the same processor for processing. In a typical case, a hash value based on a sender IP address and a receiver IP address of an input packet determines a processor to process these packets. In the session-based method, all packets belonging to the same session are processed by the same processor, thereby ensuring sequential packet delivery and efficiently using the processor cache. However, the session-based method has a problem in that the utilization of the processor is lower than that of the round robin method because the input packet is not evenly distributed to all processors.
본 발명은 상기와 같은 문제점을 해결하기 위하여 창안된 것으로, 본 발명의 목적은 다중 프로세서 라우터에서 동일한 세션에 속하는 패킷을 순차적으로 전달하고 또한 각 프로세서의 활용도를 극대화할 수 있는 패킷 처리 장치 및 방법을 제공하는 데 있다.The present invention was devised to solve the above problems, and an object of the present invention is to provide a packet processing apparatus and method for sequentially delivering packets belonging to the same session in a multiprocessor router and maximizing the utilization of each processor. To provide.
상기 목적을 위하여, 본 발명의 일 형태에 따른 다중 프로세서 기반의 패킷 처리 방법은, (a) 패킷 스케줄러가 입력되는 패킷을 세션(session)에 기반하여 복수개의 큐에 각각 분배하는 단계; 및 (b) 상기 복수의 큐에 분배된 패킷에 대해, 상기 다중 프로세서 중 하나의 프로세서가 자신에게 할당된 제1 큐의 패킷을 다 처리한 후, 상기 다중 프로세서 중 다른 하나의 프로세서에 할당된 제2 큐의 패킷을 처리하는 단계를 포함하는 것을 특징으로 한다.For this purpose, a multiprocessor-based packet processing method of one embodiment of the present invention comprises the steps of: (a) distributing a packet input by a packet scheduler to a plurality of queues based on a session; And (b) with respect to the packets distributed to the plurality of queues, one processor of the multiprocessor processes the packets of the first queue allocated to the first queue and then assigns to the other processor of the multiple processors. Processing a packet of two queues.
또한, 본 발명의 다른 형태에 따른 다중 프로세서 기반의 패킷 처리 방법은, (a) 상기 하나의 프로세서에 할당된 큐를 검사하여 처리 완료된 패킷이 있으면 상기 패킷을 순차적으로 전송하고, 미처리된 패킷이 있으면 상기 미처리된 패킷을 처리하는 단계; 및 (b) 상기 큐에 상기 미처리된 패킷이 없으면 다음 프로세서에 할당된 큐를 순차적으로 검사하여 상기 다음 프로세서에 할당된 큐의 미처리된 패킷을 처리하는 단계를 포함하는 것을 특징으로 한다.In addition, the multiprocessor-based packet processing method according to another aspect of the present invention, (a) checks the queue assigned to the one processor, if there is a processed packet and transmit the packet sequentially, if there is an unprocessed packet Processing the unprocessed packet; And (b) sequentially processing the queue allocated to the next processor when the queue does not have the unprocessed packet, and processing the unprocessed packet of the queue allocated to the next processor.
한편, 본 발명의 일 형태에 따른 다중 프로세서 기반의 패킷 처리 장치는, 입력되는 패킷을 세션(session)에 기반하여 분배하도록 구성된 패킷 스케줄러; 상기 분배된 패킷을 각각 저장하도록 구성된 복수의 큐; 및 상기 복수의 큐와 동일한 개수로 이루어져 개별 프로세서에 할당된 큐의 패킷을 다 처리한 경우 다른 프로세 서에 할당된 큐의 패킷을 처리하도록 각각 구성된 복수개의 프로세서를 포함하는 것을 특징으로 한다.On the other hand, a multiprocessor-based packet processing apparatus of one embodiment of the present invention includes: a packet scheduler configured to distribute an input packet based on a session; A plurality of queues configured to respectively store the distributed packets; And a plurality of processors each configured to process the packets of the queues allocated to the different processors when the packets of the queues allocated to the individual processors are processed in the same number as the plurality of queues.
본 발명에 따르면, 다중 프로세서 라우터에서 동일한 세션에 속하는 패킷들의 순차적 전달을 보장함과 동시에 각 프로세서의 활용도를 극대화시킬 수 있는 효과가 있다.According to the present invention, the sequential delivery of packets belonging to the same session can be guaranteed in a multiprocessor router, and the utilization of each processor can be maximized.
이하에서는 첨부 도면 및 바람직한 실시예를 참조하여 본 발명을 상세히 설명한다. 참고로, 하기 설명에서 본 발명의 요지를 불필요하게 흐릴 수 있는 공지 기능 및 구성에 대한 상세한 설명은 생략하였다.Hereinafter, the present invention will be described in detail with reference to the accompanying drawings and preferred embodiments. For reference, in the following description, detailed descriptions of well-known functions and configurations that may unnecessarily obscure the subject matter of the present invention are omitted.
구체적 설명에 앞서, 본 발명에서 사용되는 '세션(Session)'이란 용어는, TCP(Trasmission Control Protocol)의 경우 TCP/IP 네트워킹 기능을 가진 2개의 장비(예컨대, 호스트 A, 호스트 B)들이 3-방식 핸드쉐이킹(3-way handshaking) 과정을 이용하여 TCP 접속을 맺고, 데이터를 교환하며, 종료 절차를 통해 접속을 해제하기까지의 과정을 수행하는 것을 의미한다. UDP(User Datagram Protocol)의 경우 명시적인 세션의 확립/종료 절차가 없으므로 새로운(즉, 기 설정된 세션에 속하지 않는) UDP 패킷이 입력되면 새로운 세션의 시작으로 판단하고, 이후에 일정 시간 동안 상기 세션에 속하는 UDP 패킷이 추가로 입력되지 않으면 해당 세션은 종료되었다고 판단한다. Prior to the detailed description, the term 'session' used in the present invention means that two devices (eg, host A and host B) having a TCP / IP networking function in the case of TCP (Trasmission Control Protocol) By using a 3-way handshaking process, a process of establishing a TCP connection, exchanging data, and releasing the connection through a termination procedure is performed. In case of User Datagram Protocol (UDP), there is no explicit session establishment / termination procedure. Therefore, when a new (ie, non-preset session) UDP packet is input, it is determined to start a new session. If no additional UDP packet is input, the session is determined to be terminated.
이러한 세션에서, 2개의 호스트 A, B가 맺는 소정 세션은 호스트 A의 IP 주 소, 호스트 A의 포트, 호스트 B의 IP 주소, 호스트 B의 포트, 및 프로토콜(TCP 또는 UDP)과 같은 5개의 파라미터로 구분된다.In such a session, a given session between two hosts A and B is divided into five parameters: host A's IP address, host A's port, host B's IP address, host B's port, and protocol (TCP or UDP). Separated by.
도 2는 본 발명에 따른 다중 프로세서 라우터에서의 패킷 처리 방식을 설명하는 개념도이다. 참고로, 본 발명인 다중 프로세서 기반의 패킷 처리 장치는 다중 프로서세 라우터 자체로 구현되거나 또는 다중 프로세서 라우터의 일부분으로 구현될 수 있다. 2 is a conceptual diagram illustrating a packet processing scheme in a multiprocessor router according to the present invention. For reference, the present invention may be implemented as a multiprocessor router or a part of a multiprocessor router.
도 2에 도시한 바와 같이, 본 발명에 따른 다중 프로세서 기반의 패킷 처리 장치는, 세션에 기반하여 입력 패킷을 분산(분배)시키는 패킷 스케줄러(210)와, 분산된 패킷을 각각 저장하는 복수개의 큐(220a, 220b, ..., 220n)와, 상기 복수개의 큐(220a, 220b, ..., 220n)에 대응되도록 동일한 개수로 이루어져 자신에게 할당된 큐의 패킷을 다 처리한 경우 다른 큐의 패킷을 처리하도록 각각 구성된 복수개의 프로세서(230a, 230b, ..., 230n)를 포함한다. 이때, 프로세서(230a, 230b, ..., 230n) 각각은 상기 패킷에 대한 정보를 저장하는 캐쉬(cache)를 포함한다.As shown in FIG. 2, the multiprocessor-based packet processing apparatus according to the present invention includes a
패킷 스케줄러(210)는 상술한 세션에 기반하여 복수개의 큐(220a, 220b, ..., 220n)에 패킷을 분배한다. 즉, 패킷 스케줄러(210)는 동일한 세션에 속하는 모든 패킷들이 동일한 큐(220a, 220b, ..., 220n)에 저장되도록 한다. 이를 위하여, 패킷 스케줄러(210)는 패킷이 입력될 때마다 해쉬 함수를 이용하여 상기 패킷을 해당 큐(220a, 220b, ..., 220n)에 저장한다. 이를 첨부된 도 3 및 도 4를 참고하여 더욱 상세히 설명한다.The
도 3은 본 발명의 일 실시예에 따른 패킷 스케줄러의 구성을 나타내는 도면 으로서, 도 3에 도시한 바와 같이, 패킷 스케줄러(210)는 해쉬 함수부(211)와 모듈로 연산부(212)를 포함한다.3 is a diagram illustrating a configuration of a packet scheduler according to an embodiment of the present invention. As shown in FIG. 3, the
해쉬 함수부(211)는 임의의 길이의 입력값에 대해 고정된 길이의 출력값으로 변화시켜 주는 것으로, 예컨대 소정 패킷의 수신자 IP 주소를 입력값으로 사용하는 경우, 동일한 수신자 IP 주소를 입력값으로 하면 동일한 값을 출력하나, 상이한 수신자 IP 주소를 입력값으로 하면 상이한 값을 출력한다. 이러한 해쉬 함수부(211)는 프로그래밍 코드로도 구현이 가능하다.The
모듈로 연산부(212)는 해쉬 함수부(211)의 출력값을 큐(220a, 220b, ..., 220n)의 개수로 모듈로 연산(modulo operation)을 수행하여 그 결과값에 해당하는 큐(220a, 220b, ..., 220n)에 패킷을 저장한다. 예컨대, 큐의 개수가 4개인 경우, 해쉬 함수부(211)의 출력값에 따라 4개의 큐에 분산되어 저장된다. 해쉬 함수부(211)의 출력값은 수신자 IP 주소가 동일하면 동일한 값을 출력하게 되고, 수신자 IP 주소가 다르면 서로 다른 값을 출력하게 되므로, 모듈로 연산부(212)는 동일한 수신자 IP 주소에 해당하는 패킷들을 동일한 큐에 저장할 수 있다. 이렇게 함으로써, 동일한 세션에 해당하는 패킷들을 동일한 큐에 순차적으로 전달할 수 있다.The
이와 같이 구성된 패킷 스케줄러(210)의 동작을 설명한다. 참고로, 본 발명의 일 실시예에 따른 패킷 스케줄러에 대한 구체적 구성 또는 동작 원리는 전술한 도 3의 설명을 참조할 수 있으므로 중복적인 설명은 생략하고, 이하에서는 시계열적으로 발생하는 단계를 중심으로 간단히 설명한다.The operation of the
먼저 패킷이 입력되면, 해쉬 함수부(211)가 해당 패킷의 정보를 자신의 입력 값으로 이용한다(S410-S420). 이때, 패킷의 정보로는 송신자 IP 주소, 수신자 IP 주소, 송신자 포트 번호, 수신자 포트 번호, 프로토콜 중 적어도 하나를 들 수 있다. First, when a packet is input, the
그런 다음, 모듈로 연산부(212)가 해쉬 함수부(211)의 출력 값에 대하여 큐(220a, 220b, ..., 220n)의 개수로 모듈로 연산(modulo operation)을 수행하여 이 연산 결과가 지정하는 큐에 상기 입력된 패킷을 저장한다(S430-S440). 이렇게 함으로써, 패킷 스케줄러(210)는 동일한 세션에 속하는 패킷들을 동일한 큐에 순차적으로 전달할 수 있다.Then, the
한편, 프로세서(230a, 230b, ..., 230n)는 자신에게 할당된 큐(220a, 220b, ..., 220n)의 패킷을 다 처리한 경우에는 다른 큐(220a, 220b, ..., 220n)의 패킷을 처리하도록 구성된다. 이를 위하여, 프로세서(230a, 230b, ..., 230n)는 큐(220a, 220b, ..., 220n)에 저장된 패킷을 나타내는 구조체에 완료 플래그 필드를 추가시켜, 해당 패킷에 대한 처리를 완료하면 이 완료 플래그 필드에 해당 패킷에 대한 처리가 완료되었음을 표시하도록 구성된다. 이러한 프로세서를 도 5 및 도 6을 참조하여 보다 상세히 설명하면 다음과 같다.On the other hand, when the
도 5는 본 발명의 일 실시예에 따른 프로세서의 구성을 나타내는 도면으로서, 본 발명에 따른 패킷 처리 장치는 이러한 프로세서가 복수개로 구성된다.5 is a diagram showing the configuration of a processor according to an embodiment of the present invention, the packet processing apparatus according to the present invention is composed of a plurality of such processors.
도 5에 도시한 바와 같이, 하나의 프로세서(230a)는 패킷 검사부(232)와, 패킷 전송부(233)와, 패킷 처리부(234)와, 완료 플래그 처리부(235)와, 큐 검사부(236)를 포함한다. 또한, 상기 프로세서(230a)는 패킷 처리를 위한 라우팅 테이 블(240)을 포함한다. 그러나, 경우에 따라서는 복수개의 프로세서(230a, 230b, ..., 230n)가 라우팅 테이블(240)을 공유하도록 구현될 수도 있다.As shown in FIG. 5, one
패킷 검사부(232)는 큐(220a)에 처리 완료된 패킷이 있는지 검사하거나, 미처리된 패킷이 있는지 검사하도록 구성된다. 이 패킷 검사부(232)는 완료 플래그 필드를 검사하여 해당 패킷의 처리 여부에 대한 상태를 알 수 있다. 예컨대, 프로세서(230a)는 자신의 큐(220a)에 패킷이 존재하고, 그 패킷의 완료 플래그 필드를 검사한 결과 패킷 처리가 완료되었음이 표시되어 있으면 처리 완료된 패킷으로 판단하고, 표시되어 있지 않으면 미처리된 패킷으로 판단하여 그 판단 결과에 따라 패킷 전송부(233) 또는 패킷 처리부(234)를 동작하도록 한다. 한편, 프로세서(230a)는 다른 큐(220b, ..., 220n)에 패킷이 존재하고, 그 패킷의 완료 플래그 필드를 검사한 결과 패킷 처리가 완료되었음이 표시되어 있으면 처리 완료된 패킷으로 판단하고 다음 패킷을 검사하고, 표시되어 있지 않으면 미처리된 패킷으로 판단하여 해당 패킷을 처리하도록 패킷 처리부(234)를 동작시킨다.The
패킷 전송부(233)는, 처리 완료된 패킷을 순차적으로 전송하도록 구성된다. 이때, 프로세서(230a) 자신에게 할당된 큐(220a)의 패킷이 처리 완료되면, 패킷 전송부(233)는 해당 패킷을 순차적으로 전송하되, 타 프로세서(230b, ..., 230n)에 할당된 큐(220b, ..., 220n)의 패킷에 대해서는 처리 완료된 패킷이라 하더라도 동작하지 않는다. 이를 통해 패킷의 순차적 전송을 보장할 수 있다.The
패킷 처리부(234)는, 입력되는 패킷에 대해 라우팅 테이블(240)을 참조하여 어느 포트로 보낼 것인지를 결정하도록 구성된다. The
완료 플래그 처리부(235)는, 패킷 처리부(234)에서 소정 패킷에 대한 처리가 완료되면 해당 패킷의 완료 플래그 필드에 이 패킷이 처리 완료되었음을 나타내도록 표시한다. 예컨대, 이러한 표시는 '0'으로 기재된 완료 플래그 필드에 '1'을 기재하는 방식으로 표시할 수 있다.When the
큐 검사부(236)는 프로세서(230a)가 타 프로세서(230b, ..., 230n)에 할당된 큐(220b, ..., 220n)로 이동하는 경우, 해당 큐가 자신에게 할당된 큐인지를 검사한다. 이 검사 결과를 통해 프로세서(230a)는 순환적으로 큐의 패킷을 처리하더라도 다시 자신에게 할당된 큐로 돌아올 경우, 자신 또는 다른 프로세서(220b, ..., 220n)에 의해 처리 완료된 패킷에 대하여 패킷 전송부(233)를 통해 목적지로 전달할 수 있다.When the
라우팅 테이블(240)은 모든 목적지 정보에 대하여 해당 목적지에 도달하기 위해 거쳐야 할 다음 라우터 또는 수신자 호스트 정보를 포함한다. 즉, 목적지 네트워크의 대역 정보와, 다음 라우터 또는 수신자 호스트 주소 정보를 대응시킨 테이블이며, 패킷 처리부(234)에서 이 라우팅 테이블(240)에서 기 설정된 경로를 선택할 수 있도록 구성된다.The routing table 240 includes, for all destination information, the next router or receiver host information to go through to reach that destination. That is, the table is a table in which the band information of the destination network and the next router or receiver host address information are associated with each other, and the
이와 같이 구성된 프로세서(230a)의 동작을 설명한다. 참고로, 본 발명의 일 실시예에 따른 프로세서에 대한 구체적 구성 또는 동작 원리는 전술한 도 5의 설명을 참조할 수 있으므로 중복적인 설명은 생략하고, 이하에서는 시계열적으로 발생하는 단계를 중심으로 간단히 설명한다.The operation of the
먼저, 자신에게 할당된 큐에 이미 처리 완료된 패킷이 있는지 검사한 다(S610-S620). 검사 결과, 처리 완료된 패킷이 있으면 이 패킷을 순차적으로 전송한다(S630). 그러나, 처리 완료된 패킷이 없으면 미처리된 패킷이 있는지 검사한다(S640).First, it is checked whether there is a packet already processed in the queue assigned to the self (S610-S620). As a result of the check, if there is a processed packet, the packets are sequentially transmitted (S630). However, if there is no processed packet, it is checked whether there is an unprocessed packet (S640).
단계 S640의 검사 결과, 미처리된 패킷이 있으면 해당 패킷을 처리한 후 완료 플래그에 처리가 완료되었음을 표시한다(S650). 그러나, 미처리된 패킷이 없으면 다른 프로세서에 할당된 큐를 검사한다(S660). 예컨대, 프로세서 NP1(230a)이 자신에게 할당된 큐(220a)의 패킷을 모두 처리한 경우 다른 프로세서 NP2(230b)에 할당된 큐(220b)를 검사한다. 이때, 이 프로세서 NP2에 할당된 큐(220b)의 패킷을 모두 처리한 경우 또 다른 프로세서 NP3(230c)에 할당된 큐(220c)를 검사한다. 이와 동일한 과정으로 마지막 프로세서 NPn(230n)에 할당된 큐(220n)의 패킷을 모두 처리한 경우 다시 자신에게 할당된 큐(220a)를 검사한다. As a result of the check in step S640, if there is an unprocessed packet, after processing the packet, the completion flag indicates that the processing is completed (S650). However, if there are no unprocessed packets, the queue allocated to another processor is checked (S660). For example, when the
이에 따라 단계 S660 이후, 현재 이동한 큐가 자신에게 할당된 큐인지를 검사한다(S670). 단계 S670의 검사 결과, 자신에게 할당된 큐가 아니면 단계 S640으로 돌아가 미처리 패킷이 있는지 확인하고 있으면 해당 패킷을 처리한 후 완료 플래그에 표시하나, 자신에게 할당된 큐이면 다시 단계 S620으로 돌아가 처리 완료된 패킷이 존재하는지 확인하고 처리 완료된 패킷이 있으면 해당 패킷을 전송한다. 이는 프로세서 NP1(230a)이 다른 프로세서에 할당된 큐를 검사/패킷을 처리하는 동안 다른 프로세서가 해당 패킷을 이미 처리 완료한 경우가 있을 수 있기 때문이다.Accordingly, after step S660, it is checked whether the currently moved queue is assigned to the queue (S670). As a result of the check in step S670, if the queue is not assigned to itself, the process returns to step S640 to check whether there are any unprocessed packets, and after processing the packets, mark the completion flag. Checks if there is a packet and sends the packet if there is a processed packet. This is because the other processor may have already processed the packet while the
이러한 프로세서의 동작에 따라 하나의 세션에 속하는 패킷들은 항상 큐에 저장된 순서대로 전송되는 것이 보장되는 장점이 있다. 이와 더불어, 하나의 큐에 프로세서가 몰리더라도 모든 프로세서가 균등하게 패킷을 처리하게 되므로 각 프로세서의 활용도를 극대화 시킬 수 있는 장점이 있다.According to the operation of such a processor, packets belonging to one session are always guaranteed to be transmitted in the order stored in the queue. In addition, even if processors are crowded in one queue, all processors process packets evenly, thereby maximizing utilization of each processor.
도 5는 본 발명의 일 실시예에 따른 프로세서의 동작 결과를 설명하기 위한 예시도로서, 프로세서는 NP1, NP2, NP3 및 NP4가 존재하고, 프로세서 NP1에 할당된 큐가 Q1, 프로세서 NP2에 할당된 큐가 Q2, 프로세서 NP3에 할당된 큐가 Q3, 프로세서 NP4에 할당된 큐가 Q4이며, 큐 Q1에는 패킷 d1, d2, d3가, 큐 Q2에는 패킷 e1 내지 e16이, 큐 Q3에는 패킷 f1, f2, f3가, 큐 Q4에는 패킷 g1이 패킷 스케줄러에 의해 분배되었다고 가정한다. 5 is an exemplary diagram for describing an operation result of a processor according to an exemplary embodiment of the present invention, in which a processor includes NP1, NP2, NP3, and NP4, and a queue allocated to the processor NP1 is assigned to Q1 and processor NP2. The queue is Q2, the queue assigned to processor NP3 is Q3, the queue assigned to processor NP4 is Q4, packets d1, d2, d3 are queued to Q1, packets e1 to e16 to queue Q2, and packets f1 and f2 to queue Q3. , f3 assumes that the packet g1 is distributed to the queue Q4 by the packet scheduler.
도 5를 참조하면, 먼저 T1 시간 동안에, 각 프로세서들은 도 4의 순서에 따라 각 패킷들을 처리하여 전송한다. 즉, 프로세서 NP1은 패킷 d1을, 프로세서 NP2는 패킷 e1을, 프로세서 NP3는 패킷 f1을, 프로세서 NP4는 패킷 g1을 처리한 후, 자신에게 할당된 패킷이므로 바로 전송한다.Referring to FIG. 5, first, during the T1 time, each processor processes and transmits each packet in the order of FIG. 4. That is, the processor NP1 processes the packet d1, the processor NP2 processes the packet e1, the processor NP3 processes the packet f1, and the processor NP4 processes the packet g1.
T2 시간 동안에, 각 프로세서들은 전술한 바와 유사한 순서로 각 패킷들을 처리한다. 즉, 프로세서 NP1은 패킷 d2를, 프로세서 NP2는 패킷 e2를, 프로세서 NP3는 패킷 f2를 처리하여 전송하나, 프로세서 NP4는 자신에게 할당된 큐 Q4에 처리할 패킷이 존재하지 않으므로, 다른 프로세서(예컨대, NP1)에 할당된 큐 Q1을 검사하여 패킷 d3를 처리한다. 이때, 본 실시예에서는 이웃 프로세서인 NP1에 할당된 큐 Q1을 검사하나, 다른 프로세서 NP2 또는 NP3에 할당된 큐를 검사할 수도 있다. 또한, 이러한 큐의 패킷에 대한 처리는 각 프로세서 별로 상호 배타적으로 이루어 지도록 한다.During the T2 time, each processor processes each packet in a similar order as described above. That is, the processor NP1 processes the packet d2, the processor NP2 processes the packet e2, and the processor NP3 processes and transmits the packet f2. However, since the processor NP4 does not have a packet to process in the queue Q4 allocated thereto, another processor (for example, The queue Q1 assigned to NP1) is checked to process packet d3. In this embodiment, the queue Q1 assigned to the neighboring processor NP1 is checked, but the queue assigned to another processor NP2 or NP3 may be checked. In addition, the processing of the packets of the queue are mutually exclusive for each processor.
T3 시간 동안에, 프로세서 NP2는 패킷 e3를, 프로세서 NP3는 패킷 f3를 처리하여 전송한다. 한편, 프로세서 NP1은 프로세서 NP4에 의해 처리된 패킷 d3를 전송하고 다른 프로세서(예컨대, NP2)에 할당된 큐 Q2를 검사하여 해당 패킷(즉, e4)을 처리하고, 프로세서 NP4는 프로세서 NP1에 할당된 큐 Q1에도 처리할 패킷이 존재하지 않으므로, 다른 프로세서(예컨대, NP2)에 할당된 큐 Q2을 검사하여 패킷 e5를 처리한다.During time T3, processor NP2 processes packet e3 and processor NP3 processes and transmits packet f3. On the other hand, processor NP1 transmits the packet d3 processed by processor NP4 and examines the queue Q2 assigned to another processor (e.g., NP2) to process the corresponding packet (i.e., e4), and processor NP4 is assigned to processor NP1. Since there is no packet to process in the queue Q1, the queue Q2 assigned to another processor (e.g., NP2) is examined to process packet e5.
T4 시간 동안에, 프로세서 NP2는 프로세서 NP1 및 NP4에 의해 처리 완료된 패킷 e4 및 e5를 전송하고 패킷 e6를 처리하여 전송한다. 한편 프로세서 NP1, NP3 및 NP4는 각각 프로세서 NP2에 할당된 큐 Q2의 패킷 e7, e8, 및 e9를 처리한다.During the time T4, processor NP2 transmits packets e4 and e5 processed by processors NP1 and NP4, and processes and transmits packet e6. Processors NP1, NP3, and NP4, on the other hand, process packets e7, e8, and e9 of queue Q2 assigned to processor NP2, respectively.
T5 시간 동안에, 프로세서 NP2는 프로세서 NP1 및 NP4에 의해 처리 완료된 패킷 e7, e8 및 e9를 전송하고 패킷 e10을 처리하여 전송한다. 한편 프로세서 NP1, NP3 및 NP4는 각각 프로세서 NP2에 할당된 큐 Q2의 패킷 e11, e12, 및 e13을 처리한다.During the time T5, the processor NP2 transmits the packets e7, e8 and e9 processed by the processors NP1 and NP4, and processes and transmits the packet e10. Processors NP1, NP3, and NP4, on the other hand, process packets e11, e12, and e13 of queue Q2 assigned to processor NP2, respectively.
이러한 방식으로, T6 시간 동안에 모든 패킷을 처리하므로, 종래 대로라면 프로세서 NP1은 T3 시간 동안에, 프로세서 NP 2는 T16 시간 동안에, 프로세서 NP3는 T3 시간 동안에, 프로세서 NP4는 T1 시간 동안에 처리할 패킷들을 본 발명에 따르면 T6 시간 동안에 모두 처리할 수 있다.In this manner, since all packets are processed during the T6 time, the processor NP1 according to the prior art processes the packets to be processed during the T3 time, the processor NP 2 for the T16 time, the processor NP3 for the T3 time, and the processor NP4 for the T1 time. According to the T6, all can be processed during the time.
한편, 본 발명에 따른 패킷 처리 방법 및 프로세서의 동작은 컴퓨터 프로그 램으로 작성 가능하다. 예컨대, 상술한 패킷 처리 방법 및 프로세서의 동작에 개시된 알고리즘을 기초로 프로그램을 구성하는 코드들 및 코드 세그먼트들은 당해 기술분야의 컴퓨터 프로그래머에 의하여 용이하게 추론될 수 있다. 또한, 이러한 패킷 처리 방법 및 프로세서의 동작 프로그램은 컴퓨터가 읽을 수 있는 기록매체에 저장되고, 컴퓨터에 의하여 읽혀지고 실행됨으로써 구현할 수 있다.On the other hand, the packet processing method and the operation of the processor according to the present invention can be written by a computer program. For example, codes and code segments constituting a program based on the algorithm disclosed in the above-described packet processing method and operation of a processor can be easily inferred by a computer programmer in the art. In addition, such a packet processing method and an operating program of a processor may be implemented by being stored in a computer-readable recording medium and being read and executed by a computer.
지금까지 본 발명을 바람직한 실시예를 참조하여 상세히 설명하였지만, 본 발명이 속하는 기술분야의 당업자는 본 발명이 그 기술적 사상이나 필수적 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있으므로, 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적인 것이 아닌 것으로서 이해해야만 한다.Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art to which the present invention pertains can implement the present invention in other specific forms without changing the technical spirit or essential features, The examples are to be understood in all respects as illustrative and not restrictive.
그리고, 본 발명의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 특정되는 것이며, 특허청구범위의 의미 및 범위 그리고 그 등가개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.In addition, the scope of the present invention is specified by the appended claims rather than the detailed description, and all changes or modifications derived from the meaning and scope of the claims and their equivalent concepts are included in the scope of the present invention. Should be interpreted as
도 1은 일반적인 다중 프로세서 라우터에서의 패킷 처리 방식을 설명하는 개념도.1 is a conceptual diagram illustrating a packet processing scheme in a general multiprocessor router.
도 2는 본 발명의 일 실시예에 따른 다중 프로세서 라우터에서의 패킷 처리 방식을 설명하는 개념도.2 is a conceptual diagram illustrating a packet processing scheme in a multiprocessor router according to an embodiment of the present invention.
도 3은 본 발명의 일 실시예에 따른 패킷 스케줄러의 구성을 나타내는 순서도.3 is a flow chart showing the configuration of a packet scheduler according to an embodiment of the present invention.
도 4는 본 발명의 일 실시예에 따른 패킷 스케줄러의 동작을 나타내는 순서도.4 is a flowchart illustrating operation of a packet scheduler according to an embodiment of the present invention.
도 5는 본 발명의 일 실시예에 따른 프로세서의 구성을 나타내는 도면.5 is a diagram illustrating a configuration of a processor according to an embodiment of the present invention.
도 6은 본 발명의 일 실시예에 따른 프로세서의 동작을 나타내는 순서도.6 is a flowchart illustrating operation of a processor according to an embodiment of the present invention.
도 7은 본 발명의 일 실시예에 따른 프로세서의 동작 결과를 설명하기 위한 예시도.7 is an exemplary diagram for describing an operation result of a processor according to an embodiment of the present invention.
* 도면의 주요 부분에 대한 부호의 설명 *Explanation of symbols on the main parts of the drawings
210: 패킷 스케줄러210: packet scheduler
220a, 220b, ..., 220n: 큐220a, 220b, ..., 220n: cue
230a, 230b, ..., 230n: 프로세서230a, 230b, ..., 230n: processor
Claims (15)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020070091078A KR100899526B1 (en) | 2007-09-07 | 2007-09-07 | Apparatus and Method for Processing Packet using Multi-Processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020070091078A KR100899526B1 (en) | 2007-09-07 | 2007-09-07 | Apparatus and Method for Processing Packet using Multi-Processor |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20090025901A KR20090025901A (en) | 2009-03-11 |
KR100899526B1 true KR100899526B1 (en) | 2009-05-27 |
Family
ID=40694150
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020070091078A KR100899526B1 (en) | 2007-09-07 | 2007-09-07 | Apparatus and Method for Processing Packet using Multi-Processor |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR100899526B1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101463783B1 (en) * | 2012-12-27 | 2014-11-28 | 주식회사 시큐아이 | Packet processing device and method thereof |
KR102421150B1 (en) * | 2020-11-06 | 2022-07-15 | 주식회사 윈스 | Apparatus and method for distributed processing of identical packet in high-speed network security equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR960016605A (en) * | 1994-10-27 | 1996-05-22 | 양승택 | Traffic Distribution Method for Intelligent Network System Composed of Multiple Processors |
JP2002141948A (en) | 2000-09-27 | 2002-05-17 | Internatl Business Mach Corp <Ibm> | Switching configuration and method provided with separate output buffer |
KR20040086325A (en) * | 2002-03-05 | 2004-10-08 | 인터내셔널 비지네스 머신즈 코포레이션 | Method and systems for ordered dynamic distribution of packet flows over network processing means |
KR20050012220A (en) * | 2001-10-22 | 2005-01-31 | 선 마이크로시스템즈, 인코포레이티드 | Method and apparatus for a packet classifier using a two-step hash matching process |
-
2007
- 2007-09-07 KR KR1020070091078A patent/KR100899526B1/en active IP Right Grant
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR960016605A (en) * | 1994-10-27 | 1996-05-22 | 양승택 | Traffic Distribution Method for Intelligent Network System Composed of Multiple Processors |
JP2002141948A (en) | 2000-09-27 | 2002-05-17 | Internatl Business Mach Corp <Ibm> | Switching configuration and method provided with separate output buffer |
KR20050012220A (en) * | 2001-10-22 | 2005-01-31 | 선 마이크로시스템즈, 인코포레이티드 | Method and apparatus for a packet classifier using a two-step hash matching process |
KR20040086325A (en) * | 2002-03-05 | 2004-10-08 | 인터내셔널 비지네스 머신즈 코포레이션 | Method and systems for ordered dynamic distribution of packet flows over network processing means |
Also Published As
Publication number | Publication date |
---|---|
KR20090025901A (en) | 2009-03-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10581884B2 (en) | Channel data encapsulation system and method for use with client-server data channels | |
CN113692725A (en) | System and method for facilitating efficient load balancing in a Network Interface Controller (NIC) | |
JP5931908B2 (en) | Techniques for managing traffic in routers | |
US7788411B2 (en) | Method and system for automatically reflecting hardware resource allocation modifications | |
US20120314580A1 (en) | Transmission node and reception node in content centric network, and communication method of transmission node and reception node | |
US8446824B2 (en) | NUMA-aware scaling for network devices | |
WO2018094743A1 (en) | Method for processing packet, and computer device | |
US7792140B2 (en) | Reflecting the bandwidth assigned to a virtual network interface card through its link speed | |
WO2008092773A1 (en) | System and method for multicore communication processing | |
WO2010014899A2 (en) | Remote message routing device and methods thereof | |
CN101616083A (en) | A kind of message forwarding method and device | |
WO2014023003A1 (en) | Method, apparatus, and system for controlling data transmission | |
CN109196837A (en) | The method and system of interprocess communication is carried out in user's space between OS grades of containers | |
US20080043755A1 (en) | Shared and separate network stack instances | |
JP2010226275A (en) | Communication equipment and communication method | |
KR100899526B1 (en) | Apparatus and Method for Processing Packet using Multi-Processor | |
US9015438B2 (en) | System and method for achieving enhanced performance with multiple networking central processing unit (CPU) cores | |
WO2012177689A2 (en) | Facilitating implementation, at least in part, of at least one cache management policy | |
JP2017530643A5 (en) | ||
CN105656994B (en) | A kind of business acceleration method and device | |
US7672299B2 (en) | Network interface card virtualization based on hardware resources and software rings | |
CN106060155B (en) | The method and device of P2P resource-sharing | |
CN109716310A (en) | Server unit, transmitting device and program for content distribution system | |
JP5370184B2 (en) | Data distribution method | |
US8149709B2 (en) | Serialization queue framework for transmitting packets |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20120404 Year of fee payment: 4 |
|
FPAY | Annual fee payment |
Payment date: 20130408 Year of fee payment: 5 |
|
FPAY | Annual fee payment |
Payment date: 20150305 Year of fee payment: 7 |
|
FPAY | Annual fee payment |
Payment date: 20160330 Year of fee payment: 8 |
|
FPAY | Annual fee payment |
Payment date: 20170309 Year of fee payment: 9 |
|
FPAY | Annual fee payment |
Payment date: 20180403 Year of fee payment: 10 |
|
FPAY | Annual fee payment |
Payment date: 20190401 Year of fee payment: 11 |