KR100590884B1 - apparatus and method of packet processing in Network Processor - Google Patents

apparatus and method of packet processing in Network Processor Download PDF

Info

Publication number
KR100590884B1
KR100590884B1 KR1020040007064A KR20040007064A KR100590884B1 KR 100590884 B1 KR100590884 B1 KR 100590884B1 KR 1020040007064 A KR1020040007064 A KR 1020040007064A KR 20040007064 A KR20040007064 A KR 20040007064A KR 100590884 B1 KR100590884 B1 KR 100590884B1
Authority
KR
South Korea
Prior art keywords
packet
thread
information
processing
sequence
Prior art date
Application number
KR1020040007064A
Other languages
Korean (ko)
Other versions
KR20050078964A (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 KR1020040007064A priority Critical patent/KR100590884B1/en
Publication of KR20050078964A publication Critical patent/KR20050078964A/en
Application granted granted Critical
Publication of KR100590884B1 publication Critical patent/KR100590884B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9036Common buffer combined with individual queues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/901Buffering arrangements using storage descriptor, e.g. read or write pointers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

본 발명은 네트워크 프로세서의 패킷을 처리 방법 및 그 장치에 관한 것으로, 멀티 쓰레드 프로세서를 포함하는 네트워크 프로세서가 입력되는 패킷의 순서대로 패킷을 처리하여 출력함으로써, 각 쓰레드에서 병렬 처리하면서 발생할 수 있는 패킷의 뒤바뀜 현상을 방지하여 패킷의 시퀸스를 보장하는 것이다.The present invention relates to a method and apparatus for processing a packet of a network processor, wherein a network processor including a multi-threaded processor processes and outputs the packets in the order of the input packets, thereby outputting the packets that can occur in parallel processing in each thread. This prevents the inversion and guarantees the sequence of packets.

Description

네트워크 프로세서의 패킷을 처리 방법 및 그 장치{apparatus and method of packet processing in Network Processor} Apparatus and method of packet processing in Network Processor             

도 1은 일반적인 멀티 쓰레드를 사용하는 네트워크 프로세서의 구성을 설명하기 위한 내부 블록 도면.1 is an internal block diagram illustrating a configuration of a network processor using a general multi-thread.

도 2는 일반적인 네트워크 프로세서의 각 쓰레드가 신호를 교환하면서 패킷을 처리하는 흐름을 설명하기 위한 흐름도.2 is a flowchart illustrating a flow of processing a packet by exchanging signals with each thread of a general network processor.

도 3은 본 발명의 바람직한 실시예에 따른 네트워크 프로세서의 패킷 처리 장치를 설명하기 위한 내부 블록 도면.3 is an internal block diagram illustrating a packet processing apparatus of a network processor according to an exemplary embodiment of the present invention.

도 4는 본 발명의 바람직한 실시예에 따라 네트워크 프로세서가 패킷을 처리하는 방법의 흐름을 설명하기 위한 플로우챠트 도면.4 is a flowchart for explaining the flow of a method for processing a packet by a network processor according to a preferred embodiment of the present invention.

<도면의 주요 부분에 대한 부호의 설명><Explanation of symbols for the main parts of the drawings>

100 : 네트워크 프로세서 10 ; 멀티 쓰레드 프로세서100: network processor 10; Multithreaded processor

11~1n : 쓰레드 11a~1na : 순번 확인 모듈11 ~ 1n: Thread 11a ~ 1na: Sequence Check Module

20 : 메모리 21 : 처리 순번 저장부20: memory 21: processing sequence number storage unit

22 ; 완료 순번 저장부22; Completion sequence storage

본 발명은 네트워크 프로세서의 패킷을 처리 방법 및 그 장치에 관한 것으로, 더욱 자세하게는, 멀티 쓰레드를 가지는 네트워크 프로세서에서 패킷을 처리하여 출력할 때, 패킷의 시퀸스를 보장하는 네트워크 프로세서의 패킷을 처리 방법 및 그 장치에 관한 것이다.The present invention relates to a method and apparatus for processing a packet of a network processor, and more particularly, to a packet processing method of a network processor that guarantees a sequence of a packet when processing and outputting a packet in a multi-threaded network processor, and To the device.

네트워크를 통해 교환되는 패킷을 처리하는 프로세서를 네트워크 프로세서라 말하고, 이러한 네트워크 프로세서를 구현하기 위하여 다양한 기술이 사용되고 있으며, 가장 대표적인 네트워크 프로세서가 멀티 쓰레드 기술을 사용하는 네트워크 프로세서이다.A processor that processes packets exchanged through a network is called a network processor, and various technologies are used to implement such a network processor. The most representative network processor is a network processor using a multi-threaded technology.

멀티 쓰레드 기술이란, 하나의 네트워크 프로세서에 다수개의 쓰레드를 구비하여, 입력되는 패킷을 다수개의 쓰레드에서 병렬 처리하도록 하여, 패킷 처리 속도를 극대화하는 것이다.Multi-threading technology is to have a number of threads in one network processor, to process the incoming packet in parallel in multiple threads, maximizing the packet processing speed.

도 1은 일반적인 멀티 쓰레드를 사용하는 네트워크 프로세서의 구성을 설명하기 위한 내부 블록 도면이다.1 is an internal block diagram illustrating a configuration of a network processor using a general multi-thread.

도 1을 참조하면, 네트워크 프로세서(100)는, 멀티 쓰레드 프로세서(10) 및 메모리(20)를 포함하고, 멀티 쓰레드 프로세서(10)는 다수개의 쓰레드(11~1n)를 포 함한다.Referring to FIG. 1, the network processor 100 includes a multi-threaded processor 10 and a memory 20, and the multi-threaded processor 10 includes a plurality of threads 11 to 1n.

그리고, 네트워크 프로세서(100)는 네트워크로부터 입력되는 패킷을 수신하는 입력 포트(미도시)와, 네트워크로 패킷을 출력하는 출력 포트(미도시)를 포함할 수 있다.The network processor 100 may include an input port (not shown) for receiving a packet input from a network and an output port (not shown) for outputting a packet to a network.

다수개의 쓰레드(11~1n)는 네트워크로부터 수신되는 패킷을 처리한다. 즉, 네트워크 프로세서(100)에 셋팅된 프로그램에 따라 수신되는 패킷을 처리한다.Multiple threads 11-1n handle packets received from the network. That is, the packet received according to the program set in the network processor 100 is processed.

이때, 다수개의 쓰레드(11~1n)의 패킷 처리는, 수신되는 패킷의 출력 포트롤 서치하거나, 패킷에 대한 포워딩 처리를 하거나, 패킷의 해당 출력 포트를 통해 네트워크로 출력 처리하는 것 등이 해당 될 수 있다.At this time, the packet processing of the plurality of threads 11 to 1n may include searching the output port of the received packet, forwarding the packet, or outputting the packet to the network through the corresponding output port of the packet. Can be.

그리고, 메모리(20)는 수신되는 패킷을 다수개의 쓰레드(11~1n)가 처리할 수 있도록 임시 저장하거나, 각 쓰레드(11~1n)가 패킷을 처리할 패킷 처리 순번 등을 저장한다.The memory 20 temporarily stores the received packet to be processed by the plurality of threads 11 to 1n, or stores the packet processing order number for each thread 11 to 1n to process the packet.

이러한, 멀티 쓰레드 프로세서(10)를 포함하는 네트워크 프로세서(100)에서 패킷을 처리하는 방법은 크게 쓰레드(11~1n)간 신호를 교환하면서 패킷을 처리하는 방법과, 각 쓰레드(11~1n)가 개별적으로 패킷을 처리하는 방법이 있다.The method of processing a packet in the network processor 100 including the multi-threaded processor 10 includes a method of processing a packet while exchanging signals between the threads 11-1n, and each of the threads 11-1n. There is a way to process packets individually.

이러한, 패킷 처리 방법 중 첫 번째로 각 쓰레드(11~1n)가 신호를 교환하면서 패킷을 처리하는 방법은, 하나의 쓰레드가 패킷을 처리하면서 다음 쓰레드에게 패킷 처리 기회를 부여하는 패킷 처리 신호를 전송하여, 패킷의 시퀸스를 보장하는 방법이다.In the first method of processing a packet, each thread 11 to 1n processes a packet while exchanging a signal. A thread processes a packet and transmits a packet processing signal that gives a next thread a chance to process the packet. In this way, the packet sequence is guaranteed.

도 2는 일반적인 네트워크 프로세서의 각 쓰레드가 신호를 교환하면서 패킷 을 처리하는 흐름을 설명하기 위한 흐름도이다.2 is a flowchart illustrating a flow of processing a packet by exchanging signals by each thread of a general network processor.

도 2에 도시된 바와 같이, 제 1 쓰레드(11)가 패킷을 처리하는 작업을 수행하고, 다음 쓰레드인 제 2 쓰레드(12)로 패킷 처리 기회를 부여하는 패킷 처리 신호를 전송한다.As shown in FIG. 2, the first thread 11 performs a task of processing a packet, and transmits a packet processing signal that gives a packet processing opportunity to a second thread 12, which is a next thread.

그리고, 제 2 쓰레드(12)는 제 1 쓰레드(11)로부터 패킷 처리 신호가 수신되면, 수신되는 패킷을 처리하고, 제 3 쓰레드(13)로 패킷 처리 기회를 부여하는 패킷 처리 신호를 전송한다.When the packet processing signal is received from the first thread 11, the second thread 12 processes the received packet and transmits a packet processing signal to the third thread 13 to give a packet processing opportunity.

따라서, 멀티 쓰레드 프로세서(10)에 포함되는 각 쓰레드(11~1n)는 이전 쓰레드로부터 패킷 처리 기회를 부여하는 패킷 처리 신호가 수신되면, 패킷을 처리함으로써 전체 패킷 처리 작업을 수행하는 기간인 각 페이저(phase)내에서 입력되는 패킷의 시퀸스를 보장한다.Therefore, when each thread 11 to 1n included in the multi-threaded processor 10 receives a packet processing signal that gives a packet processing opportunity from a previous thread, each pager, which is a period during which the entire packet processing operation is performed by processing the packet, is performed. This guarantees the sequence of incoming packets in phase.

그러나, 각 쓰레드(11~1n)간 신호를 교환하는 방법은, 각 쓰레드(11~1n)에서 패킷 처리를 하는 시간이 상이하게 다르거나, 하나의 쓰레드에서 패킷 처리하는 시간이 지연(latency) 또는 속도가 늦어지게 되는 경우, 전체 멀티 쓰레드 프로세서(10)의 패킷 처리 속도가 늦어지는 문제가 발생한다.However, in the method of exchanging signals between the threads 11 to 1n, the packet processing time is different in each thread 11 to 1n, or the packet processing time in one thread is delayed or If the speed becomes slow, a problem occurs that the packet processing speed of the entire multi-threaded processor 10 becomes slow.

즉, 멀티 쓰레드 프로세서(10)에 포함되는 각 쓰레드(11~1n) 중에서 패킷 처리 속도가 가장 늦은 쓰레드의 패킷 처리 속도에 따라 네트워크 프로세서(100)의 패킷 처리 속도가 결정되게 된다.That is, the packet processing speed of the network processor 100 is determined according to the packet processing speed of the thread having the lowest packet processing speed among the threads 11 to 1n included in the multi-threaded processor 10.

한편, 멀티 쓰레드 프로세서(10)를 포함하는 네트워크 프로세서(100)에서 패킷을 처리하는 방법 중 두 번째로 각 쓰레드(11~1n)가 패킷을 처리하는 방법은 각 쓰레드(11~1n)가 패킷 처리 순번에 관계없이 각자 패킷을 처리하는 것으로, 입력되는 패킷의 시퀴스를 보장하지 못한다.On the other hand, the second of the methods of processing the packet in the network processor 100 including the multi-threaded processor 10, each of the threads (11 ~ 1n) to process the packet, each thread (11 ~ 1n) packet processing By processing each packet regardless of the sequence number, it does not guarantee the sequence of incoming packets.

이러한 각 쓰레드(11~1n)가 패킷을 처리하는 방법에서 입력되는 패킷의 시퀸스를 보장하기 위하여, 입력되는 각 패킷(11~1n)에 순번을 할당하고, 각 패킷의 순번을 네트워크 프로세서(100)에서 글로벌(global)하게 관리하는 방법 등을 사용한다.In order to ensure the sequence of the packets that are input in the method in which each of these threads 11 to 1n processes the packets, the network processor 100 assigns a sequence number to each of the packets 11 to 1n input, and assigns the sequence numbers of the packets to the network processor 100. Use global management methods, etc.

네트워크 프로세서(100)는 각 쓰레드(11~1n)가 패킷을 처리하여 출력하기 전에 글로벌하게 관리하는 각 패킷의 순번을 확인하여, 해당 패킷이 출력되어야 하는 순번인지 여부를 확인하고, 해당 패킷의 순번이 현재 출력해야 하는 순번이 아니면, 임시 저장 영역에 패킷을 임시 저장하고, 순번이 되는 경우, 임시 저장된 패킷을 출력하여, 패킷의 시퀸스를 보장하게 된다.The network processor 100 checks the order of each packet that is globally managed before each thread 11 to 1n processes and outputs a packet, and confirms whether the corresponding packet should be output, and the order of the corresponding packet. If the sequence number is not currently output, the packet is temporarily stored in the temporary storage area, and if the sequence number is stored, the temporarily stored packet is output to ensure the sequence of the packet.

그러나, 이러한 방법은, 각 쓰레드(11~1n)간 공유하는 순번 정보에 대하여 상호 배타(Mutual Exclusion)적 관계를 보장해야 함으로 별도의 정보 관리가 필요하다.However, this method requires a separate information management because a mutual exclusion relationship must be guaranteed with respect to the sequence information shared between the threads 11 to 1n.

또한, 네트워크 프로세서(100)는 출력 순번이 어긋난 모든 패킷을 저장 영역에 임시 저장해야 함으로, 저장 영역의 저장 용량에 따라 시퀸스를 보장할 수 있는 패킷 개수의 범위가 한정되는 문제가 발생한다.In addition, since the network processor 100 temporarily stores all packets whose output order is out of order in the storage area, there is a problem in that the range of the number of packets that can guarantee the sequence is limited according to the storage capacity of the storage area.

따라서, 본 발명은 상기와 같은 문제점을 해결하기 위하여 창안된 것으로, 멀티 쓰레드를 가지는 네트워크 프로세서에서 패킷을 병렬 처리하여 출력할 때, 패킷의 시퀸스를 보장하는 네트워크 프로세서의 패킷을 처리 방법 및 그 장치를 제공하는 것에 그 목적이 있다.Accordingly, the present invention has been made to solve the above-mentioned problem, and a method and apparatus for processing a packet of a network processor that guarantees the sequence of the packet when the packet is processed in parallel in a network processor having multiple threads. The purpose is to provide.

상기 목적을 달성하기 위한 본 발명의 일측면에 따른 네트워크 프로세서의 패킷 처리 장치는, 네트워크를 통해 입력되는 패킷과, 패킷을 처리할 순서 정보인 제 1 순번 정보 및 패킷을 출력할 순서 정보인 제 2 순번 정보를 저장하는 메모리와, 메모리에 저장된 제 1 순번 정보에 따라 패킷의 순서대로 병렬 처리하고, 패킷 처리가 완료되면, 제 2 순번 정보에 따라 상기 처리 완료된 패킷을 출력하는 적어도 하나 이상의 쓰레드를 포함한다.A packet processing apparatus of a network processor according to an aspect of the present invention for achieving the above object, the packet is input via the network, the first order information that is the order information to process the packet and the second information that is the order information to output the packet A memory for storing the sequence information, and at least one thread for parallel processing in order of packets according to the first sequence information stored in the memory, and outputting the processed packet according to the second sequence information when the packet processing is completed. do.

그리고, 본 발명에 따른 네트워크 프로세서의 패킷 처리 장치의 각 쓰레드는, 메모리에 접근하여, 제 1 순번 정보를 패킷 처리 순번 정보로 할당받으면, 제 1 순번 정보를 증가시켜 저장하는 순번 확인부를 포함한다.Each thread of the packet processing apparatus of the network processor according to the present invention includes a sequence confirmation unit for accessing a memory and incrementing and storing the first sequence information when the first sequence information is allocated as the packet processing sequence information.

또한, 본 발명에 따른 순번 확인부는, 패킷 처리가 완료되면, 메모리에 저장된 제 2 순번 정보와, 제 1 순번 정보를 비교하여, 동일하면, 각 쓰레드가 패킷을 출력할 수 있도록 하고, 제 2 순번 정보를 증가시켜 저장한다.In addition, when the packet processing is completed, the sequence number checking unit according to the present invention compares the second sequence information stored in the memory with the first sequence information, and if the same is the same, allows each thread to output a packet, and the second sequence number. Increase and store the information.

아울러, 본 발명에 따른 순번 확인부는, 제 1 순번 정보와, 제 2 순번 정보가 동일하지 않으면, 패킷을 출력하지 않고, 다음 쓰레드에서 패킷 처리 기회를 부여하고, 각 순번 정보가 동일한지 여부를 소정 주기로 확인한다.In addition, if the first sequence information and the second sequence information are not the same, the sequence confirmation unit according to the present invention does not output a packet, gives a packet processing opportunity in a next thread, and determines whether each sequence information is the same. Check periodically.

한편, 본 발명의 다른 측면에 따른 네트워크 프로세서의 패킷 처리 방법은, 각 쓰레드에 패킷을 처리할 순서 정보인 제 1 순번 정보와, 패킷을 출력할 순서 정보인 제 2 순번 정보를 초기 설정하여 저장하는 단계와, 각 쓰레드가 저장된 제 1 순번 정보를 할당받고, 제 1 순번 정보에 따라 네트워크로부터 입력되는 패킷의 순서대로 병렬 처리하는 단계와, 각 쓰레드가 패킷 처리를 완료하고, 저장된 제 2 순번 정보와, 할당된 제 1 순번 정보를 비교하여, 각 순번 정보가 동일하면, 패킷을 출력하는 단계와, 각 쓰레드가 패킷을 출력하고, 다음 패킷이 출력되도록 제 2 순번 정보를 증가시켜 저장하는 단계를 포함한다.On the other hand, according to another aspect of the present invention, a packet processing method of a network processor includes initially setting and storing first sequence information, which is order information to process a packet, and second sequence information, which is order information to output a packet, for each thread. And, each thread is assigned first stored sequence number information, and performs parallel processing in the order of packets inputted from the network according to the first sequence information, and each thread completes processing of the packet, and stores the stored second sequence information. Comparing the allocated first sequence information, and if each sequence information is the same, outputting a packet; and increasing and storing the second sequence information so that each thread outputs the packet and the next packet is output. do.

그리고, 본 발명에 따른 네트워크 프로세서의 패킷 처리 방법은, 각 쓰레드가 각 순번 정보가 동일하지 않으면, 패킷을 출력하지 않고, 다음 쓰레드로 패킷 처리 기회를 부여하는 단계와, 패킷 처리 기회를 다음 쓰레드로 부여하고, 각 순번 정보가 동일한지 여부를 소정 주기로 확인하는 단계를 더 포함한다.In the packet processing method of the network processor according to the present invention, if each thread does not have the same sequence number information, a step of giving a packet processing opportunity to a next thread without outputting a packet, and a packet processing opportunity to a next thread And confirming whether or not each order information is the same at a predetermined cycle.

이하 본 발명에 따른 네트워크 프로세서의 패킷을 처리 방법 및 그 장치를 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, a method and an apparatus for processing a packet of a network processor according to the present invention will be described in detail with reference to the accompanying drawings.

도 3은 본 발명의 바람직한 실시예에 따른 네트워크 프로세서의 패킷 처리 장치를 설명하기 위한 내부 블록 도면이다.3 is an internal block diagram illustrating a packet processing apparatus of a network processor according to an exemplary embodiment of the present invention.

도 3을 참조하면, 본 발명에 따른 네트워크 프로세서(100)는, 멀티 쓰레드 프로세서(10) 및 메모리(20)를 포함하고, 멀티 쓰레드 프로세서(10)는 다수개의 쓰레드(11~1n)를 포함한다.Referring to FIG. 3, the network processor 100 according to the present invention includes a multi-threaded processor 10 and a memory 20, and the multi-threaded processor 10 includes a plurality of threads 11 to 1n. .

그리고, 각 쓰레드(11~1n)는 순번 확인 모듈(11a~1na)을 포함하고, 메모리(20)는 처리 순번 저장부(21) 및 완료 순번 저장부(22)를 포함한다.Each of the threads 11 to 1n includes a sequence number checking module 11a to 1na, and the memory 20 includes a process sequence storage 21 and a completion sequence storage 22.

이때, 메모리(20)는 각 쓰레드(11~1n)가 공유할 수 있는 저장 수단의 일례이고, 기타 공유 레지스터 등이 사용될 수 있다.At this time, the memory 20 is an example of storage means that each of the threads 11 to 1n can share, and other shared registers may be used.

그리고, 네트워크 프로세서(100)는 네트워크로부터 입력되는 패킷을 수신하는 입력 포트(미도시)와, 네트워크로 패킷을 출력하는 출력 포트(미도시)를 포함할 수 있다.The network processor 100 may include an input port (not shown) for receiving a packet input from a network and an output port (not shown) for outputting a packet to a network.

멀티 쓰레드 프로세서(10)의 각 쓰레드(11~1n)는 입력되는 패킷을 순서대로 병렬 처리하여 출력한다.Each thread 11 to 1n of the multi-threaded processor 10 processes the input packets in parallel and outputs them in order.

이때, 각 쓰레드(11~1n)는 동일한 패킷 처리 기능을 가지며, 이러한 각 쓰레드(11~1n)의 기능은 입력되는 패킷의 출력 포트를 서치하거나, 패킷에 대한 포워딩 처리를 하거나, 패킷의 해당 출력 포트를 통해 네트워크로 출력 처리하는 기능 등이 해당 될 수 있다.In this case, each of the threads 11 to 1n has the same packet processing function, and the functions of each of the threads 11 to 1n search for an output port of an incoming packet, perform a forwarding process on a packet, or output a corresponding packet. This can be the function of outputting to a network through a port.

그리고, 메모리(20)의 처리 순번 저장부(21)는 각 쓰레드(11~1n)에 할당되는 패킷 처리 순번 정보를 저장하고, 완료 순번 저장부(22)는 각 쓰레드(11~1n)가 패킷을 처리 완료하는 처리 완료 순번 정보를 저장한다.In addition, the processing order storage unit 21 of the memory 20 stores packet processing order information allocated to each thread 11 to 1n, and the completion order storage unit 22 stores each packet 11 to 1n as a packet. Stores processing completion sequence information for processing completion.

각 쓰레드(11~1n)의 각 순번 확인 모듈(11a~1na)은 메모리(20)에 접근하여, 해당 쓰레드(11~1n)의 패킷 처리 순번 및 패킷 처리를 완료하는 처리 완료 순번을 할당받는다.Each order confirmation module 11a-1na of each thread 11-1n accesses the memory 20 and is assigned a packet processing order of the corresponding thread 11-1n and a processing completion order of completing packet processing.

즉, 각 쓰레드(11~1n)의 각 순번 확인 모듈(11a~1na)은 메모리(20)의 처리 순번 저장부(21)에 접근하여 해당 쓰레드(11~1n)의 패킷 처리 순번을 할당받고, 완료 순번 저장부(11~1n)에 접근하여 패킷의 처리 완료 순번을 할당받는다.That is, each sequence number checking module 11a to 1na of each thread 11 to 1n accesses the processing sequence number storage unit 21 of the memory 20 and receives the packet processing sequence number of the corresponding thread 11 to 1n. Access to the completion sequence number storage unit (11 ~ 1n) is assigned a processing completion sequence of the packet.

그리고, 각 쓰레드(11~1n)의 각 순번 확인 모듈(11a~1na)은 해당 쓰레드(11~1n)가 패킷 처리를 완료하면, 해당 쓰레드(11~1n)가 패킷 처리를 완료할 순번인지 여부를 확인하고, 순번이 맞으면, 해당 쓰레드(11~1n)에 처리 완료 신호를 전송한다. Each of the sequence checking modules 11a to 1na of each of the threads 11 to 1n determines whether the corresponding threads 11 to 1n complete the packet processing when the corresponding threads 11 to 1n complete packet processing. If the sequence number is correct, the processing completion signal is transmitted to the corresponding threads 11 to 1n.

또한, 각 쓰레드(11~1n)는 각 순번 확인 모듈(11a~1na)로부터 처리 완료 신호가 수신되면, 패킷을 출력한다.Each of the threads 11 to 1n outputs a packet when a processing completion signal is received from each of the order confirmation modules 11a to 1na.

한편, 각 순번 확인 모듈(11a~1na)은 해당 쓰레드(11~1n)가 패킷 처리를 완료할 순번이 아닌 경우, 다음 쓰레드가 패킷을 처리하도록 패킷 처리 기회를 부여한다.On the other hand, each turn identification module (11a ~ 1na) provides a packet processing opportunity for the next thread to process the packet, if the corresponding thread (11 ~ 1n) is not a turn order to complete the packet processing.

이때, 각 쓰레드(11~1n)간 패킷 처리 기회를 부여하는 방법은, 각 쓰레드(11~1n)가 할당받은 순번에 따라 라운드 로빈 방식으로 패킷 처리 기회를 부여할 수 있다.In this case, the method for providing a packet processing opportunity between each of the threads 11 to 1n may give a packet processing opportunity in a round robin manner according to the order in which the threads 11 to 1n are allocated.

도 4는 본 발명의 바람직한 실시예에 따라 네트워크 프로세서가 패킷을 처리하는 방법의 흐름을 설명하기 위한 플로우챠트 도면이다.4 is a flowchart illustrating a flow of a method of processing a packet by a network processor according to an exemplary embodiment of the present invention.

도 4를 참조하면, 네트워크 프로세서(100)의 각 쓰레드(11~1n)는 입력되는 패킷을 처리하는 작업을 수행하기 위하여 각 변수들을 초기화한다(S 1).Referring to FIG. 4, each of the threads 11 ˜ 1n of the network processor 100 initializes each variable in order to perform a task of processing an input packet (S 1).

여기서, 각 쓰레드(11~1n)가 사용하는 변수는 각 쓰레드(11~1n)가 가지는 고유한 순번 정보를 가지는 로컬 변수 및 각 쓰레드(11~1n)가 공유하는 정보를 가지 는 글로벌 변수로 나뉠 수 있다.Here, the variables used by each thread (11 to 1n) are divided into local variables having unique sequence information of each thread (11 to 1n) and global variables having information shared by each thread (11 to 1n). Can be.

먼저, 로컬 변수는 Local_Thread_Sequence_ID'로 표현되며, 로컬 변수 값은 해당 쓰레드(11~1n)가 할당받은 패킷 처리 순번 정보가 된다.First, the local variable is expressed as Local_Thread_Sequence_ID ', and the local variable value is packet processing sequence information allocated by the corresponding thread 11 to 1n.

그리고, 각 쓰레드(11~1n)는 자신에게 할당된 고유한 저장 영역에 로컬 변수 값을 저장한다.Each thread 11 to 1n stores local variable values in its own storage area.

이때, 각 쓰레드(11~1n)는 메모리(20)의 소정 저장 영역에 로컬 변수를 저장할 수 있다.In this case, each thread 11 to 1n may store a local variable in a predetermined storage area of the memory 20.

그리고, 글로벌 변수는 'Global_Current_Thread_ID'로 표현되며, 각 쓰레드(11~1n)의 패킷 처리 순번 정보를 가지는 처리 순번 글로벌 변수와, Global_Expect_Thread_ID'로 표현되며, 각 쓰레드(11~1n)의 처리 완료 순번 정보를 가지는 완료 순번 글로벌 변수로 이루어 질 수 있다.The global variable is represented by 'Global_Current_Thread_ID', a processing sequence global variable having packet processing sequence information of each thread 11 ~ 1n, and a global variable, Global_Expect_Thread_ID ', and processing completion sequence information of each thread 11-1n. Completion sequence with a global variable can be made.

그리고, 각 쓰레드(11~1n)가 각 변수의 초기화 값은, Local_Thread_Sequence_ID'는 0 값을 가지고, 'Global_Current_Thread_ID'는 0 값을 가지고, Global_Expect_Thread_ID'는 0 값을 가질 수 있다.Each thread 11 to 1n may have an initialization value of each variable, Local_Thread_Sequence_ID 'has a value of 0,' Global_Current_Thread_ID 'has a value of 0, and Global_Expect_Thread_ID' has a value of 0.

이때, 각 쓰레드(11~1n)가 초기화한 Local_Thread_Sequence_ID'의 값은 각 쓰레드(11~1n)에 할당된 고유한 저장 영역에 저장되고, 'Global_Current_Thread_ID'의 값은 처리 순번 저장부(21)에 저장되고, Global_Expect_Thread_ID'의 값은 완료 순번 저장부(22)에 저장된다.At this time, the value of Local_Thread_Sequence_ID 'initialized by each thread 11-1n is stored in a unique storage area allocated to each thread 11-1n, and the value of' Global_Current_Thread_ID 'is stored in the processing sequence storage 21. The value of Global_Expect_Thread_ID 'is stored in the completion order storage unit 22.

또한, 각 쓰레드는 각 변수 값을 초기화하고, 패킷 처리 순번 정보를 할당받는다(S 2).In addition, each thread initializes each variable value and is assigned packet processing sequence number information (S 2).

즉, 각 쓰레드(11~1n)의 순번 확인 모듈(11a~1na)은 메모리(20)의 처리 순번 저장부(21)에 접근하여, 패킷 처리 순번 정보를 할당받고, 다음 쓰레드에 패킷 처리 순번을 부여하기 위하여 처리 순번 저장부(21)에 저장된 패킷 처리 순번 정보를 증가시킨다(Global_Current_Thread_ID=Global_Current_Thread_ID+1).That is, the sequence number checking modules 11a to 1na of each of the threads 11 to 1n access the processing sequence number storage unit 21 of the memory 20 to receive packet processing sequence information, and to assign the packet processing sequence number to the next thread. To give it, the packet processing sequence information stored in the processing sequence storage 21 is incremented (Global_Current_Thread_ID = Global_Current_Thread_ID + 1).

일례를 들어, 각 변수 값들이 초기화되고, 제 1 쓰레드(11)부터 패킷 처리 작업이 시작되는 경우, 제 1 쓰레드(11)의 순번 확인 모듈(11a)은 메모리(20)의 처리 순번 저장부(21)에 접근하여 저장된 'Global_Current_Thread_ID'의 값인 0을 패킷 처리 순번 정보로 할당받는다.For example, when each variable value is initialized and a packet processing operation is started from the first thread 11, the sequence number checking module 11a of the first thread 11 may store the sequence number storage unit () of the memory 20. 21) and 0, the value of stored 'Global_Current_Thread_ID', is assigned as packet processing sequence information.

그리고, 순번 확인 모듈(11a)은 처리 순번 저장부(21)에 저장된 'Global_Current_Thread_ID'의 값을 1로 증가시킨다.Then, the order confirmation module 11a increases the value of 'Global_Current_Thread_ID' stored in the process order storage 21 to 1.

제 1 쓰레드가 각 순번 정보를 할당받으면, 다음 쓰레드인 제 2 쓰레드(12)의 순번 확인 모듈(12a)은 메모리(20)의 처리 순번 저장부(21)에 접근하여 저장된 'Global_Current_Thread_ID'의 값인 1을 패킷 처리 순번 정보로 할당받는다.When the first thread is assigned each sequence information, the sequence number checking module 12a of the second thread 12, which is the next thread, accesses the processing sequence storage unit 21 of the memory 20 and stores 1, which is a value of 'Global_Current_Thread_ID'. Is assigned as packet processing sequence number information.

그리고, 순번 확인 모듈(12a)은 처리 순번 저장부(21)에 저장된 'Global_Current_Thread_ID'의 값을 2로 증가시킨다.Then, the order confirmation module 12a increases the value of 'Global_Current_Thread_ID' stored in the process order storage 21 to 2.

이와 같은 라운드 로빈 방식으로 각 쓰레드(11~1n)의 각 순번 확인 모듈(11a~1na)이 패킷 처리 순번 정보를 할당받고, 그 패킷 처리 순번 정보를 로컬 변수 값으로 하여 고유한 저장 영역에 저장한다(Local_Thread_Sequence_ID=Global_Current_Thread_ID).In this round robin manner, each sequence identification module 11a to 1na of each thread 11 to 1n is allocated packet processing sequence information, and stores the packet processing sequence information as a local variable value in a unique storage area. (Local_Thread_Sequence_ID = Global_Current_Thread_ID).

그리고, 각 쓰레드(11~1n)는 할당받은 패킷 처리 순번 정보에 따라 입력되는 패킷을 병렬 처리한다(S 3). 즉, 첫 번째 입력되는 패킷을 패킷 처리 순번 0을 할당받은 제 1 쓰레드(11)가 처리하고, 두 번째 입력되는 패킷을 패킷 처리 순번 1을 할당받은 제 2 쓰레드(12)가 처리한다.Each of the threads 11 to 1n processes the received packets in parallel according to the allocated packet processing sequence information (S 3). That is, the first thread 11, which has been allocated packet processing sequence 0, processes the first input packet, and the second thread 12, which has been allocated packet processing sequence 1, processes the second input packet.

이때, 각 쓰레드(11~1n)는 동일한 패킷 처리 기능을 수행하는 것이 바람직하며, 이러한 패킷 처리 기능은, 입력되는 패킷의 출력 포트를 서치하여 출력 처리하거나, 패킷에 대한 포워딩 처리를 하거나, 패킷의 해당 출력 포트를 통해 네트워크로 출력 처리하는 기능 등이 해당 될 수 있고, 이하 상세 설명에서는 일례를 들어 각 쓰레드(11~1n)가 패킷의 포워딩을 처리하는 경우에 대하여 설명한다.In this case, it is preferable that each of the threads 11 to 1n perform the same packet processing function, and the packet processing function searches for an output port of an input packet and outputs it, performs a forwarding process on the packet, A function of output processing to a network through the corresponding output port may be applicable. In the following detailed description, a case where each thread 11 to 1n processes packet forwarding will be described.

즉, 각 쓰레드(11~1n)는 입력되어 메모리(20)에 임시 저장되는 패킷의 헤더 정보를 추출하여, 패킷의 출력 포트를 설정된 포워딩 테이블(미도시)에서 서치하고, 해당 출력 포트로 패킷이 출력되도록 포워딩한다.That is, each thread 11 to 1n extracts header information of a packet that is input and is temporarily stored in the memory 20, searches for an output port of the packet in a set forwarding table (not shown), and sends the packet to the corresponding output port. Forward to output.

그리고, 각 쓰레드(11~1n)의 각 순번 확인 모듈(11a~1na)은 입력되는 패킷에 대한 포워딩 처리가 완료되면, 해당 쓰레드(11~1n)의 로컬 변수 값과, 완료 순번 저장부(22)에 저장된 완료 순번 글로벌 변수 값이 동일하지 여부를 확인한다(Local_Thread_Sequence_ID==Global_Expect_Thread_ID)(S 4).When the forwarding process for the incoming packet is completed, each sequence number checking module 11a to 1na of each thread 11 to 1n receives a local variable value of the corresponding thread 11 to 1n and a completion sequence number storing unit 22. ), Check whether the global sequence number of completion sequence number stored in the server is the same (Local_Thread_Sequence_ID == Global_Expect_Thread_ID) (S4).

여기서, 로컬 변수 값은 순번 확인 모듈(11a~1na)이 처리 순번 저장부(21)에 접근하여 할당받은 처리 순번 글로벌 변수 값과 동일한 값이 된다(Local_Thread_Sequence_ID=Global_Current_Thread_ID).Here, the local variable value becomes the same value as the global sequence value assigned by the sequence number checking module 11a to 1na by accessing the sequence number storage 21 (Local_Thread_Sequence_ID = Global_Current_Thread_ID).

각 순번 확인 모듈(11a~1na)은 해당 쓰레드(11~1n)의 로컬 변수 값과 완료 순번 글로벌 변수 값이 동일하지 않으면, 해당 쓰레드(11~1n)가 패킷 처리 기능을 완료하여 패킷을 출력할 순번이 아니라고 판단하여, 다음 쓰레드에 패킷 처리 기회를 넘기고(S 5), 완료 순번 저장부(22)에 저장된 완료 순번 글로벌 변수 값이 해당 쓰레드(11~1n)의 로컬 변수 값과 동일한지 여부를 재확인한다(S 4).Each sequence checking module 11a to 1na outputs a packet by completing the packet processing function if the local variable value of the corresponding thread 11 to 1n and the completion sequence global variable value are not the same. If it is determined that the sequence number is not determined, the packet processing opportunity is passed to the next thread (S 5), and the completion sequence number global variable value stored in the completion sequence number storage unit 22 is equal to the local variable value of the corresponding thread 11 to 1n. Recheck (S 4).

여기서, 완료 순번 글로벌 변수 값은 패킷을 처리하여 출력할 쓰레드(11~1n)의 완료 순번 정보가 된다.Here, the completion sequence global variable value is the completion sequence information of the threads 11 to 1n to process and output the packet.

이때, 각 순번 확인 모듈(11a~1na)은 소정 시간을 주기로 로컬 변수 값과 완료 순번 글로벌 변수 값이 동일한지 여부를 재확인하거나, 하나의 쓰레드가 패킷을 처리하면, 각 변수 값이 동일한지 여부를 재확인할 수 있다.At this time, each sequence number checking module 11a to 1na reconfirms whether the local variable value and the completion sequence global variable value are the same at predetermined intervals, or if one thread processes a packet, whether each variable value is the same. You can reconfirm.

한편, 각 순번 확인 모듈(11a~11na)은 해당 쓰레드(11~1n)의 로컬 변수 값과, 완료 순번 저장부(22)에 저장된 완료 순번 글로벌 변수 값이 동일하면, 메모리(20)에 임시 저장된 패킷의 포워딩 처리에 따라 출력한다(S 6). On the other hand, each sequence number checking module (11a ~ 11na) is temporarily stored in the memory 20, if the local variable value of the corresponding thread (11 ~ 1n) and the completion sequence number global variable value stored in the completion sequence number storage unit 22 is the same The packet is output according to the forwarding process of the packet (S6).

그리고, 각 순번 확인 모듈(11a~1na)은 메모리(20)의 완료 순번 저장부(22)에 저장된 완료 순번 글로벌 변수 값을 증가시킨다(Global_Expect_Thread_ID=Global_Expect_Thread_ID+1)(S 7).Each sequence identification module 11a to 1na increments the sequence number global variable value stored in the sequence number storage 22 of the memory 20 (Global_Expect_Thread_ID = Global_Expect_Thread_ID + 1) (S7).

이때, 각 순번 확인 모듈(11a~1na)이 완료 순번 글로벌 변수 값을 증가시키는 것은, 각 쓰레드(11~1n)가 패킷을 출력하고, 패킷의 시퀸스를 보장하기 위하여, 다음 패킷을 처리하는 쓰레드(11~1n)가 패킷을 출력할 수 있도록 하기 위함이다.At this time, each of the sequence identification modules 11a to 1na increases the completion sequence global variable value, so that each thread 11 to 1n outputs a packet and processes the next packet in order to ensure the packet sequence. 11 ~ 1n) to output the packet.

일례에 따라 제 1 쓰레드(11)가 입력되는 패킷에 대한 포워딩을 완료하면, 제 1 순번 확인 모듈(11a)은 제 1 쓰레드(11)의 로컬 변수 값인 0과 완료 순번 저장부(22)에 저장된 완료 순번 글로벌 변수 값인 0을 비교하고, 그 비교 결과, 동일 한 값이므로 제 1 쓰레드(11)가 패킷을 출력할 수 있도록 처리 완료 신호를 제공한다.According to an example, when the first thread 11 completes the forwarding of the input packet, the first sequence number checking module 11a may store 0, which is a local variable value of the first thread 11, and the completion sequence number storing unit 22. Comparing the completion order global variable value 0, the comparison result is the same value, and thus the processing completion signal is provided so that the first thread 11 can output the packet.

그리고, 제 1 순번 확인 모듈(11a)은 완료 순번 저장부(22)에 저장된 완료 순번 글로벌 변수 값을 1로 증가시킨다.In addition, the first sequence number checking module 11a increases the completion sequence number global variable value stored in the completion sequence number storage 22 to 1.

또한, 제 1 쓰레드(11)는 제 1 순번 확인 모듈(11a)로부터 처리 완료 신호가 제공되면, 메모리(20)에 임시 저장되어 있는 패킷을 출력한다.In addition, when the processing completion signal is provided from the first order confirmation module 11a, the first thread 11 outputs a packet temporarily stored in the memory 20.

그리고, 제 1 쓰레드(11)가 패킷을 출력한 상태에서 제 2 쓰레드(12)가 입력되는 패킷에 대한 포워딩을 완료하면, 제 2 순번 확인 모듈(12a)은 완료 순번 저장부(22)에 저장된 완료 순번 글로벌 변수 값인 1과, 제 2 쓰레드(12)의 로컬 변수 값인 1을 비교하고, 그 비교 결과, 각 변수 값이 동일한 값이므로 제 2 쓰레드(12)가 패킷을 출력할 수 있도록 처리 완료 신호를 제공한다.When the second thread 12 completes the forwarding of the packet to which the second thread 12 is output while the first thread 11 outputs the packet, the second sequence number checking module 12a is stored in the completion sequence number storage 22. Comparing the completion sequence number 1, the global variable value, and the local variable value 1 of the second thread 12, and as a result of the comparison, the processing completion signal for the second thread 12 to output the packet because each variable value is the same value. To provide.

그리고, 제 2 순번 확인 모듈(12a)은 완료 순번 저장부(22)에 저장된 완료 순번 글로벌 변수 값을 2로 증가시킨다.Then, the second sequence number confirmation module 12a increases the value of the completion sequence global variable stored in the completion sequence storage 22 to 2.

또한, 제 2 쓰레드(12)는 제 2 순번 확인 모듈(12a)로부터 처리 완료 신호가 제공되면, 메모리(20)에 임시 저장되어 있는 패킷을 출력한다.In addition, when the processing completion signal is provided from the second order confirmation module 12a, the second thread 12 outputs a packet temporarily stored in the memory 20.

그리고, 제 3 쓰레드(13)가 입력되는 패킷에 대한 포워딩을 완료하면, 제 3 순번 확인 모듈(13a)은 제 3 쓰레드(13)의 로컬 변수 값과, 완료 순번 글로벌 변수값을 비교한 결과에 따라 패킷을 출력한다.When the third thread 13 completes the forwarding of the input packet, the third sequence number checking module 13a compares the local variable value of the third thread 13 with the completion sequence number global variable value. Output the packet accordingly.

반면, 제 1 쓰레드(11)보다 제 2 쓰레드(12)가 입력되는 패킷의 포워딩을 먼저 완료하는 경우, 제 2 쓰레드(12)의 제 2 순번 확인 모듈(12a)은 완료 순번 저장 부(22)에 저장된 완료 순번 글로벌 변수 값인 0과, 제 2 쓰레드(12)의 로컬 변수 값인 1을 비교하고, 그 비교 결과, 각 변수 값이 동일하지 않음으로 패킷을 출력하지 않고, 다음 쓰레드로 패킷 처리 기회를 넘긴다.On the other hand, when the second thread 12 completes the forwarding of the packet to which the second thread 12 is input before the first thread 11, the second sequence number checking module 12a of the second thread 12 may complete the sequence number storing unit 22. Comparing the completion sequence number global variable value 0 stored in to the local variable value 1 of the second thread 12, the comparison result shows that each variable value is not the same, and the packet is not outputted. Pass it over.

각 쓰레드(11~1n)가 할당된 패킷 처리 순번에 따라 라운드 로빈 방식으로 패킷 처리 기회를 획득하여 패킷을 처리하거나, 소정 시간이 지난 후, 제 1 쓰레드(11)가 패킷의 포워딩 처리를 완료하면, 제 1 순번 확인 모듈(11a)은 제 1 쓰레드(11)의 로컬 변수 값인 0과 완료 순번 저장부(22)에 저장된 완료 순번 글로벌 변수 값인 0을 비교하여, 그 비교 결과, 각 변수 값이 동일한 값이므로, 제 1 쓰레드(11)가 패킷을 출력할 수 있도록 처리 완료 신호를 제공하고, 완료 순번 저장부(22)에 저장된 완료 순번 글로벌 변수 값을 1로 증가시킨다.When each thread 11 to 1n acquires a packet processing opportunity in a round robin manner and processes the packet according to the assigned packet processing sequence number, or after a predetermined time, the first thread 11 completes the forwarding process of the packet. The first sequence number checking module 11a compares 0, the local variable value of the first thread 11, with 0, the global sequence value of the completion sequence number stored in the completion sequence storage unit 22, and as a result of the comparison, each variable value is the same. As a value, the first thread 11 provides a processing completion signal to output a packet, and increases the completion sequence global variable value stored in the completion sequence storage 22 to 1.

그리고, 제 2 순번 확인 모듈(12a)은 완료 순번 저장부(22)에 저장된 완료 순번 글로벌 변수 값인 1과, 제 2 쓰레드(12)의 로컬 변수 값인 1을 비교하고, 그 비교 결과, 각 변수 값이 동일한 값이므로 제 2 쓰레드(12)가 패킷을 출력할 수 있도록 처리 완료 신호를 제공하고, 완료 순번 저장부(22)에 저장된 완료 순번 글로벌 변수 값을 2로 증가시킨다.The second sequence number checking module 12a compares the global sequence number 1, which is stored in the sequence number storage unit 22, with the local variable value 1 of the second thread 12, and compares each variable value. Since this is the same value, the second thread 12 provides a processing completion signal to output the packet, and increases the completion sequence global variable value stored in the completion sequence storage 22 to 2.

이때, 제 2 쓰레드(12)의 제 2 순번 확인 모듈(12a)은 소정 시간을 주기로 제 2 쓰레드(12)의 로컬 변수 값과, 완료 순번 글로벌 변수 값을 비교하거나, 하나의 쓰레드가 패킷 처리를 완료하는 순간마다 각 변수 값을 비교하여, 제 2 쓰레드(12)가 패킷을 출력할 수 있도록 하는 것이 바람직하다.At this time, the second sequence number checking module 12a of the second thread 12 compares the local variable value of the second thread 12 with the completion sequence number global variable value at a predetermined time interval, or one thread performs packet processing. It is desirable to compare the value of each variable every time it completes so that the second thread 12 can output the packet.

이상에서 본 발명은 기재된 구체 예에 대해서만 상세히 설명하였지만 본 발 명의 기술 사상 범위 내에서 다양한 변형 및 수정이 가능함은 당업자에게 있어서 명백한 것이며, 이러한 변형 및 수정이 첨부된 특허청구범위에 속함은 당연한 것이다.Although the present invention has been described in detail only with respect to the described embodiments, it will be apparent to those skilled in the art that various changes and modifications can be made within the scope of the present invention, and such modifications and modifications belong to the appended claims.

상기한 바와 같이, 본 발명에 따르면, 멀티 쓰레드를 가지는 네트워크 프로세서에서 패킷을 병렬 처리하여 처리 속도를 최대화하면서 처리된 패킷을 출력할 순번을 확인하여, 해당 패킷을 출력할 순번에 출력하여, 패킷의 시퀸스를 보장할 수 있는 효과가 있다.As described above, according to the present invention, in a network processor having a multi-threaded process, the packets are processed in parallel to confirm the order of outputting the processed packets while maximizing the processing speed, and the packets are output in the order of outputting the packet. This has the effect of ensuring the sequence.

Claims (11)

네트워크 프로세서의 패킷 처리 장치에 있어서,In the packet processing apparatus of the network processor, 네트워크를 통해 입력되는 패킷을 처리하기 위한 순서 정보인 제 1 순번 정보 및 상기 패킷을 출력할 순서 정보인 제 2 순번 정보를 저장하는 메모리;A memory for storing first order information that is order information for processing a packet input through a network and second order information that is order information for outputting the packet; 상기 메모리에 저장된 상기 제 1 순번 정보에 따라 상기 네트워크를 통해 입력되는 패킷의 순서대로 병렬 처리하고, 상기 제 2 순번 정보에 따라 상기 처리된 패킷을 출력하는 적어도 하나 이상의 쓰레드를 포함하는 네트워크 프로세서의 패킷 처리 장치.A packet of a network processor including at least one thread for parallel processing in the order of packets input through the network according to the first order information stored in the memory, and outputting the processed packet according to the second order information Processing unit. 제 1 항에 있어서, 상기 각 순번 정보는,The method of claim 1, wherein the order information is: 하나의 쓰레드에 할당되는 제 1 순번 정보와, 제 2 순번 정보가 동일한 것을 특징으로 하는 네트워크 프로세서의 패킷 처리 장치.A packet processing apparatus of a network processor, wherein the first order information and the second order information allocated to one thread are the same. 제 1항에 있어서, 상기 각 쓰레드는,The method of claim 1, wherein each of the threads, 상기 메모리에 접근하여, 상기 제 1 순번 정보를 패킷 처리 순번 정보로 할당받으면, 상기 제 1 순번 정보를 증가시켜 저장하는 순번 확인부를 포함하는 것을 특징으로 하는 네트워크 프로세서의 패킷 처리 장치.And a sequence number confirming unit for accessing the memory and receiving the first sequence information as packet processing sequence information, and incrementing and storing the first sequence information. 제 3항에 있어서, 상기 순번 확인부는,The method of claim 3, wherein the order confirmation unit, 상기 패킷 처리가 완료되면, 상기 메모리에 저장된 상기 제 2 순번 정보와, 상기 제 1 순번 정보를 비교하여, 동일하면, 상기 각 쓰레드가 패킷을 출력할 수 있도록 하고, 상기 제 2 순번 정보를 증가시켜 저장하는 것을 특징으로 하는 네트워크 프로세서의 패킷 처리 장치.When the packet processing is completed, the second sequence information stored in the memory and the first sequence information are compared with each other, so that each thread can output a packet, and the second sequence information is increased. And a packet processor of the network processor. 제 3항에 있어서, 상기 순번 확인부는,The method of claim 3, wherein the order confirmation unit, 상기 제 1 순번 정보와, 상기 제 2 순번 정보가 동일하지 않으면, 상기 패킷을 출력하지 않고, 다음 쓰레드에서 패킷 처리 기회를 부여하고, 상기 각 순번 정보가 동일한지 여부를 소정 주기로 확인하는 것을 특징으로 하는 네트워크 프로세서의 패킷 처리 장치.If the first sequence information and the second sequence information are not the same, the packet is not outputted, a packet processing opportunity is given to a next thread, and it is checked at predetermined intervals whether the respective sequence information is the same. Packet processing apparatus of the network processor. 제 1항에 있어서, 상기 각 쓰레드의 패킷 처리는,The method of claim 1, wherein the packet processing of each thread is performed by: 상기 패킷의 출력 포트를 서치하는 입력 패킷 처리, 상기 패킷의 포워딩 처리하는 패킷 처리 또는 상기 패킷을 서치된 출력 포트로 출력하는 출력 패킷 처리 중 적어도 하나의 패킷 처리인 것을 특징으로 하는 네트워크 프로세서의 패킷 처리 장치.At least one packet processing of an input packet processing for searching the output port of the packet, a packet processing for forwarding the packet, or an output packet processing for outputting the packet to the searched output port. Device. 적어도 하나 이상의 쓰레드를 포함하는 네트워크 프로세서의 패킷 처리 방법에 있어서,In the packet processing method of the network processor including at least one thread, 상기 각 쓰레드에 패킷을 처리할 순서 정보인 제 1 순번 정보와, 패킷을 출력할 순서 정보인 제 2 순번 정보를 초기 설정하여 저장하는 단계;Initially setting and storing first order information, which is order information to process a packet, and second order information, which is order information to output a packet, for each thread; 상기 각 쓰레드가 상기 저장된 제 1 순번 정보를 할당받고, 상기 제 1 순번 정보에 따라 네트워크로부터 입력되는 패킷의 순서대로 병렬 처리하는 단계;Each of the threads receiving the stored first order information and performing parallel processing in order of packets input from a network according to the first order information; 상기 각 쓰레드가 상기 패킷 처리를 완료하고, 상기 저장된 제 2 순번 정보와, 할당된 제 1 순번 정보를 비교하여, 상기 각 순번 정보가 동일하면, 상기 패킷을 출력하는 단계;The threads completing the packet processing, comparing the stored second order information with the allocated first order information, and outputting the packet if the respective order information is the same; 상기 각 쓰레드가 상기 패킷을 출력하고, 다음 패킷이 출력되도록 상기 제 2 순번 정보를 증가시켜 저장하는 단계를 포함하는 네트워크 프로세서의 패킷 처리 방법.And each thread outputting the packet and incrementing and storing the second sequence information so that the next packet is output. 제 7항에 있어서,The method of claim 7, wherein 상기 각 쓰레드가 상기 각 순번 정보가 동일하지 않으면, 상기 패킷을 출력하지 않고, 다음 쓰레드로 패킷 처리 기회를 부여하는 단계;If each of the threads does not have the same sequence number information, giving a packet processing opportunity to a next thread without outputting the packet; 상기 패킷 처리 기회를 다음 쓰레드로 부여하고, 상기 각 순번 정보가 동일 한지 여부를 소정 주기로 확인하는 단계를 더 포함하는 네트워크 프로세서의 패킷 처리 방법.And assigning the packet processing opportunity to a next thread, and checking whether each of the sequence number information is the same at a predetermined cycle. 제 7항에 있어서, 상기 각 정보의 초기 설정은,The method of claim 7, wherein the initial setting of each piece of information, 하나의 쓰레드에 할당되는 제 1 순번 정보와, 제 2 순번 정보가 동일하도록 설정하는 것을 특징으로 하는 네트워크 프로세서의 패킷 처리 방법.A packet processing method of a network processor, characterized in that the first order information allocated to one thread and the second order information are set to be the same. 제 7항에 있어서, 상기 제 1 순번 정보는,The method of claim 7, wherein the first sequence number information, 하나의 쓰레드에 소정 순번 정보를 제 1 순번 정보로 할당하고, 다음 쓰레드에 상기 소정 순번 정보에서 '1'을 증가시켜 제 1 순번 정보로 할당하는 것을 특징으로 하는 네트워크 프로세서의 패킷 처리 방법.And assigning predetermined order information to one thread as first order information, and assigning the first order information to a next thread by incrementing '1' from the predetermined order information. 제 7항에 있어서, 상기 각 쓰레드의 패킷 처리는,8. The method of claim 7, wherein the packet processing of each thread, 상기 패킷의 출력 포트를 서치하는 입력 패킷 처리, 상기 패킷의 포워딩 처리하는 패킷 처리 또는 상기 패킷을 서치된 출력 포트로 출력하는 출력 패킷 처리 중 적어도 하나의 패킷 처리인 것을 네트워크 프로세서의 패킷 처리 방법.And at least one packet processing of an input packet processing for searching the output port of the packet, a packet processing for forwarding the packet, or an output packet processing for outputting the packet to the searched output port.
KR1020040007064A 2004-02-03 2004-02-03 apparatus and method of packet processing in Network Processor KR100590884B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020040007064A KR100590884B1 (en) 2004-02-03 2004-02-03 apparatus and method of packet processing in Network Processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020040007064A KR100590884B1 (en) 2004-02-03 2004-02-03 apparatus and method of packet processing in Network Processor

Publications (2)

Publication Number Publication Date
KR20050078964A KR20050078964A (en) 2005-08-08
KR100590884B1 true KR100590884B1 (en) 2006-06-19

Family

ID=37266014

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020040007064A KR100590884B1 (en) 2004-02-03 2004-02-03 apparatus and method of packet processing in Network Processor

Country Status (1)

Country Link
KR (1) KR100590884B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200126542A (en) 2019-04-30 2020-11-09 동의대학교 산학협력단 Packet processing apparatus and method in network processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200126542A (en) 2019-04-30 2020-11-09 동의대학교 산학협력단 Packet processing apparatus and method in network processor

Also Published As

Publication number Publication date
KR20050078964A (en) 2005-08-08

Similar Documents

Publication Publication Date Title
US4965716A (en) Fast access priority queue for managing multiple messages at a communications node or managing multiple programs in a multiprogrammed data processor
CN107209724B (en) Data processing method, memory management unit and memory control equipment
US20090070773A1 (en) Method for efficient thread usage for hierarchically structured tasks
US6804815B1 (en) Sequence control mechanism for enabling out of order context processing
US7434016B2 (en) Memory fence with background lock release
WO1996034479A1 (en) Packet switching engine
EP1438818A2 (en) Method and apparatus for a data packet classifier using a two-step hash matching process
CN112751931B (en) Network connection method and device, electronic device, and medium
US7487501B2 (en) Distributed counter and centralized sensor in barrier wait synchronization
US10430353B2 (en) Memory device performing near-data processing using a plurality of data processing engines that independently perform data processing operations, and system including the same
JPS62107363A (en) Processor selector
US6321309B1 (en) Memory arbitration scheme with circular sequence register
KR100590884B1 (en) apparatus and method of packet processing in Network Processor
US10437757B2 (en) Determine priority of requests using request signals and priority signals at an arbitration node
EP1631906B1 (en) Maintaining entity order with gate managers
US5805917A (en) Parallel processing system with a plurality of communication register modules
WO2002029511A2 (en) Method system and apparatus for multiprocessing
CN106713023B (en) CAM table operation method and device
US9977751B1 (en) Method and apparatus for arbitrating access to shared resources
CN115865783B (en) Method and device for determining target node and computer readable storage medium
CN103294603A (en) Method and device for controlling memory allocation
CN111476663B (en) Data processing method and device, node equipment and storage medium
JP4992824B2 (en) Search circuit
WO2016197607A1 (en) Method and apparatus for realizing route lookup
US6785799B1 (en) Multiprocessor with asynchronous pipeline processing of instructions, and control method thereof

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
LAPS Lapse due to unpaid annual fee