KR102050828B1 - Method for accelerating open virtual switch using parallel computation and open virtual switch using the same - Google Patents

Method for accelerating open virtual switch using parallel computation and open virtual switch using the same Download PDF

Info

Publication number
KR102050828B1
KR102050828B1 KR1020180128958A KR20180128958A KR102050828B1 KR 102050828 B1 KR102050828 B1 KR 102050828B1 KR 1020180128958 A KR1020180128958 A KR 1020180128958A KR 20180128958 A KR20180128958 A KR 20180128958A KR 102050828 B1 KR102050828 B1 KR 102050828B1
Authority
KR
South Korea
Prior art keywords
vector
hash
packet
value
mask
Prior art date
Application number
KR1020180128958A
Other languages
Korean (ko)
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 KR1020180128958A priority Critical patent/KR102050828B1/en
Application granted granted Critical
Publication of KR102050828B1 publication Critical patent/KR102050828B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • H04L45/7453Address table lookup; Address filtering using hashing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/21Flow control; Congestion control using leaky-bucket
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/65Re-configuration of fast packet switches

Abstract

Disclosed are an accelerating method of an open virtual switch using parallel calculation and an open virtual switch using the same which can increase a data processing amount of an entire network. According to an embodiment of the present invention, the accelerating method of an open virtual switch using parallel calculation is a packet processing method performed by an open virtual switch. The accelerating method comprises: a step of performing parallel masking on n (n is a natural number higher than or equal to 2) packets received from the outside to generate one or more vectors; a step of applying a hash function to the vectors to derive n hash values; and a step of looking up the hash values in a hash table to derive n matching rules mapped to the hash values.

Description

병렬 연산을 이용한 오픈 가상 스위치의 가속화 방법 및 이를 이용한 오픈 가상 스위치{METHOD FOR ACCELERATING OPEN VIRTUAL SWITCH USING PARALLEL COMPUTATION AND OPEN VIRTUAL SWITCH USING THE SAME}TECHNICAL FOR ACCELERATING OPEN VIRTUAL SWITCH USING PARALLEL COMPUTATION AND OPEN VIRTUAL SWITCH USING THE SAME}

본 발명은 가상 스위치에 관한 것으로서, 더욱 구체적으로 복수 개의 패킷을 병렬적으로 연산하여 연산의 효율성을 향상시킨 병렬 연산을 이용한 오픈 가상 스위치의 가속화 방법 및 이를 이용한 오프 가상 스위치에 관한 것이다.The present invention relates to a virtual switch, and more particularly, to an acceleration method of an open virtual switch using parallel operation and an off-virtual switch using the same, in which a plurality of packets are operated in parallel to improve operation efficiency.

이 부분에 기술된 내용은 단순히 본 발명에 대한 배경 정보를 제공할 뿐 종래기술을 구성하는 것은 아니다.The contents described in this section merely provide background information on the present invention and do not constitute a prior art.

빅데이터, IOT(Internet of Things), 클라우드(Colud) 컴퓨팅과 같은 새로운 IT 기술들이 등장하고, 모바일 기기가 확산됨에 따라, 네트워크에서 처리되어야 하는 트래픽의 양이 하드웨어 중심 네트워크 구조에서 처리하기 어려울 만큼 기하급수적으로 증가하고 있다.As new IT technologies, such as big data, the Internet of Things (IOT), and cloud computing, emerge, and as mobile devices proliferate, the amount of traffic that needs to be handled in a network is too geometric to handle in a hardware-centric network architecture. It is increasing in water supply.

이러한 문제를 해결하기 위해, 종래 하드웨어 중심의 네트워크 구조에서 벗어나, 소프트웨어 프로그래밍을 통해 네트워크 경로 설정, 제어 및 복잡한 운용관리를 편리하게 처리할 수 있는 차세대 네트워킹 기술인 소프트웨어 정의 네트워크(SDN, Software Defined Network)가 도입되고 있다.To solve this problem, Software Defined Network (SDN), a next-generation networking technology that can easily handle network routing, control, and complex operation management through software programming, has been removed from the conventional hardware-oriented network structure. It is introduced.

소프트웨어 정의 네트워크에서 네트워크 경로를 설정하는 기능은 오픈 소스 기반의 가상 스위치인 Open vSwitch(OvS)에 의해 수행되는 데, 이 OvS에 대한 일반적인 구성과 데이터 처리 흐름이 도 1에 도시되어 있다.The function of network routing in a software defined network is performed by Open vSwitch (OvS), which is an open source based virtual switch. The general configuration and data processing flow for this OvS is shown in FIG.

도 1에 도시된 바와 같이, OvS(500)는 일반적으로 Exact Match Cache(510), Megaflow Cache(520) 및 Open Flow Table(530)을 포함하여 구성될 수 있다. 물리 또는 가상 인터페이스로부터 패킷이 입력되면, 입력된 패킷의 고유한 식별자는 제한된 수의 테이블 항목에 대해 가장 빠른 처리를 제공하는 Exact Match Cache(510), 와일드카드(wildcard) 매칭을 구현하는 Megaflow Cache(520) 및 Open Flow Table(530)를 순차적으로 통과한다.As shown in FIG. 1, the OvS 500 may generally include an Exact Match Cache 510, a Megaflow Cache 520, and an Open Flow Table 530. When a packet is input from a physical or virtual interface, the unique identifier of the input packet is the Exact Match Cache 510, which provides the fastest processing for a limited number of table entries, and the Megaflow Cache, which implements wildcard matching. 520 and the Open Flow Table 530 in order.

먼저, EMC(510)에서, 패킷의 식별자가 이 테이블 내 모든 필드의 항목(entry)과 정확하게 일치 또는 매칭(Hit)되는 경우 해당 패킷은 미리 설정된 목적지로 전송(Action)되며, 그렇지 않은 경우(Miss) Megaflow Cache(520)로 전달된다.First, in the EMC 510, if the identifier of a packet matches or hits exactly the entry of every field in this table, the packet is sent to a preset destination; otherwise (Miss ) Is passed to the Megaflow Cache 520.

Megaflow Cache(520)로 전달된 패킷의 식별자는 와일드카드 매칭 방법을 통해 Megaflow Cache(520) 내 존재하는 복수 개의 서브 테이블과의 매칭 여부를 판단 받는다. The identifier of the packet transmitted to the Megaflow Cache 520 is determined by matching with a plurality of sub-tables existing in the Megaflow Cache 520 through a wildcard matching method.

그 결과, 매칭되는 경우 해당 패킷이 미리 설정된 목적지로 전송(Action)되는 반면, 매칭되지 않는 경우 해당 패킷이 Open Flow Table(530)로 전달되어 추가적인 매칭 여부를 판단 받는다. As a result, if a match is transmitted, the corresponding packet is transmitted to a predetermined destination. If not, the corresponding packet is transmitted to the Open Flow Table 530 to determine whether an additional match is made.

Megaflow Cache(520)에서, 매칭 여부의 판단은 복수 개의 서브 테이블 중 어느 서브 테이블과 패킷의 식별자 사이의 일대일 비교를 통해 수행된다. 따라서, 복수 개의 패킷이 OvS(500)로 입력되는 경우, 복수 개의 패킷 각각과 복수 개의 서브 테이블 각각 사이의 일대일 비교가 모든 패킷에 대한 매칭 판단이 완료될 때까지 수행되어, 매칭 판단 과정에 많은 시간이 소요될 수 있다.In the megaflow cache 520, the determination of a match is performed through a one-to-one comparison between any one of a plurality of subtables and an identifier of a packet. Therefore, when a plurality of packets are input to the OvS 500, a one-to-one comparison between each of the plurality of packets and each of the plurality of subtables is performed until the matching determination for all the packets is completed, so that a lot of time is spent in the matching determination process. This can take a while.

나아가, Megaflow cache(520)에서 패킷의 매칭 여부를 판단하는 데 소요되는 리소스가 OvS(500)의 전체 CPU cycle 중 많은 부분을 차지하고 있어, 이러한 소요 시간의 증가는 OvS(500)가 스위칭 기능을 수행하는 데 소요되는 시간 또한, 증가시키므로, 네트워크 전체의 데이터 처리량을 저하시키는 문제를 발생시킬 수 있다.Furthermore, the resources required to determine whether a packet is matched in the megaflow cache 520 occupy a large part of the overall CPU cycle of the OvS 500, and this increase in the time required causes the OvS 500 to perform a switching function. The time required to do this also increases, which may cause a problem of lowering the data throughput of the entire network.

본 발명의 일 실시예는, 복수 개의 패킷을 처리하는 과정에 병렬 연산 프로세싱을 적용하여 Megaflow Cache 내의 패킷 처리 과정을 가속화하고, 이를 통해 네트워크 전체의 데이터 처리량을 증가시킬 수 있는 방법과 오픈 가상 스위치를 제공하는 데 주된 목적이 있다.An embodiment of the present invention provides an open virtual switch and a method for accelerating packet processing in a megaflow cache by applying parallel operation processing to a plurality of packets, thereby increasing data throughput of the entire network. The main purpose is to provide.

본 발명의 일 실시예에 의하면, 오픈 가상 스위치(Open Virtual Switch)에서 수행되는 패킷(packet) 처리 방법으로서, 외부로부터 수신된 n(n은 2이상의 자연수)개의 패킷을 대상으로 병렬(parallel) 마스킹(masking)을 수행하여 하나 이상의 벡터를 생성하는 단계; 상기 벡터를 대상으로 해시함수를 적용하여 상기 n개의 해시 값을 도출하는 단계; 및 해시 테이블을 대상으로 상기 해시 값 각각을 조회(lookup)하여 상기 해시 값 각각과 매핑된 상기 n개의 매칭 룰(rule)을 도출하는 단계를 포함하는 것을 특징으로 하는 병렬 연산을 이용한 오픈 가상 스위치의 가속화 방법을 제공한다.According to an embodiment of the present invention, as a packet processing method performed in an open virtual switch, parallel masking is performed on n (n is a natural number of two or more) packets received from the outside. masking to generate one or more vectors; Deriving the n hash values by applying a hash function to the vector; And deriving the n matching rules mapped to each of the hash values by looking up each of the hash values in a hash table. Provide an acceleration method.

본 발명의 다른 일 실시예에 의하면, 오픈 가상 스위치(Open Virtual Switch)로서, 외부로부터 수신된 n(n은 2이상의 자연수)개의 패킷을 대상으로 병렬(parallel) 마스킹(masking)을 수행하여 하나 이상의 벡터를 생성하는 벡터생성부; 상기 벡터를 대상으로 해시함수를 적용하여 상기 n개의 해시 값을 도출하는 제1해싱부; 및 하니 이상의 해시 테이블을 대상으로 상기 해시 값 각각을 조회(lookup)하여 상기 해시 값 각각과 매핑된 상기 n개의 매칭 룰(rule)을 도출하는 제2해싱부를 포함하는 것을 특징으로 하는 병렬 연산에 기반한 오픈 가상 스위치를 제공한다.According to another embodiment of the present invention, as an open virtual switch, one or more parallel masking is performed on n (n is a natural number of two or more) packets received from the outside. A vector generator for generating a vector; A first hashing unit configured to derive the n hash values by applying a hash function to the vector; And a second hashing unit configured to lookup each of the hash values with respect to one or more hash tables to derive the n matching rules mapped to each of the hash values. Provide an open virtual switch.

이상에서 설명한 바와 같이, 본 발명은 복수 개의 패킷에 대한 병렬 연산 프로세싱을 적용하여 Megaflow cache에서 복수 개의 패킷을 처리하는 데 소요되는 시간을 감소시키도록 구성되므로, 가상 스위치의 패킷 처리 속도와 네트워크 전체의 데이터 처리량을 증가시킬 수 있다.As described above, the present invention is configured to reduce the time required to process a plurality of packets in the megaflow cache by applying parallel operation processing on the plurality of packets, so that the packet processing speed of the virtual switch and the overall network It can increase data throughput.

또한, Megaflow cache에서 소요되는 리소스가 가상 스위치의 CPU cycle 전체 중 많은 부분을 차지하는 점을 감안하면, 본 발명이 제공하는 위와 같은 효과의 효율성을 더욱 증대될 수 있다.In addition, considering that resources consumed in the megaflow cache occupy a large part of the CPU cycle of the virtual switch, the efficiency of the above effects provided by the present invention can be further increased.

도 1은 종래 OvS의 일반적인 구성과 데이터 처리 흐름을 나타낸 도면이다.
도 2는 본 발명에 의한 OvS의 구성을 개략적으로 나타낸 블록도이다.
도 3은 도 2에 도시된 OvS의 구성을 이용하여 패킷을 처리하는 본 발명의 일 실시예를 설명하기 위한 흐름도이다.
도 4는 벡터 생성을 위해 활용되는 패킷 미니플로우와 마스크 미니플로우의 일 예를 나타낸 도면이다.
도 5는 벡터 생성에 대한 본 발명의 일 예를 설명하기 위한 도면이다.
도 6은 벡터 생성에 대한 본 발명의 일 실시예를 설명하기 위한 흐름도이다.
도 7은 해시 테이블 조회에 대한 본 발명의 일 실시예를 설명하기 위한 도면이다.
도 8은 해시 테이블 조회에 대한 본 발명의 일 실시예를 설명하기 위한 흐름도이다.
1 is a diagram illustrating a general configuration and data processing flow of a conventional OvS.
2 is a block diagram schematically showing the configuration of the OvS according to the present invention.
3 is a flowchart illustrating an embodiment of the present invention for processing a packet by using the configuration of the OvS shown in FIG. 2.
4 is a diagram illustrating an example of a packet miniflow and a mask miniflow utilized for vector generation.
5 is a view for explaining an example of the present invention for vector generation.
6 is a flowchart for explaining an embodiment of the present invention for vector generation.
7 is a diagram for explaining an embodiment of the present invention for a hash table query.
8 is a flowchart illustrating an embodiment of the present invention for a hash table query.

이하, 본 발명의 일부 실시예들을 예시적인 도면을 통해 상세하게 설명한다. 각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.Hereinafter, some embodiments of the present invention will be described in detail through exemplary drawings. In adding reference numerals to the components of each drawing, it should be noted that the same reference numerals are assigned to the same components as much as possible even though they are shown in different drawings. In addition, in describing the present invention, when it is determined that the detailed description of the related well-known configuration or function may obscure the gist of the present invention, the detailed description thereof will be omitted.

또한, 본 발명의 구성 요소를 설명하는 데 있어서, 제 1, 제 2, A, B, (a), (b) 등의 용어를 사용할 수 있다. 이러한 용어는 그 구성 요소를 다른 구성 요소와 구별하기 위한 것일 뿐, 그 용어에 의해 해당 구성 요소의 본질이나 차례 또는 순서 등이 한정되지 않는다. 명세서 전체에서, 어떤 부분이 어떤 구성요소를 '포함', '구비'한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다. 또한, 명세서에 기재된 '…부', '모듈' 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어나 소프트웨어 또는 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다.In addition, in describing the component of this invention, terms, such as 1st, 2nd, A, B, (a), (b), can be used. These terms are only for distinguishing the components from other components, and the nature, order or order of the components are not limited by the terms. Throughout the specification, when a part is said to include, 'include' a certain component, which means that it may further include other components, except to exclude other components unless otherwise stated. . In addition, as described in the specification. The terms 'unit' and 'module' refer to a unit that processes at least one function or operation, which may be implemented by hardware or software or a combination of hardware and software.

도 2는 본 발명에 의한 오픈 가상 스위치(이하, '가상스위치'라 지칭한다)(100)의 구성을 개략적으로 나타낸 블록도이며, 도 3은 도 2에 도시된 가상스위치(100)의 구성을 이용하여 패킷을 처리하는 본 발명의 일 실시예를 설명하기 위한 흐름도이다.2 is a block diagram schematically showing the configuration of an open virtual switch (hereinafter referred to as a "virtual switch") 100 according to the present invention, Figure 3 is a configuration of the virtual switch 100 shown in FIG. A flowchart for describing an embodiment of the present invention for processing a packet by using the present invention.

이하에서는, 도 2 및 도 3을 참조하여 본 발명에 의한 가상스위치(100)의 구성들과 이 구성들을 이용하여 본 발명의 가상스위치(100)가 복수 개의 패킷을 병렬적으로 처리하는 방법에 대하여 상세하게 설명하도록 한다.Hereinafter, with reference to Figures 2 and 3 with respect to the configuration of the virtual switch 100 according to the present invention and a method for the virtual switch 100 of the present invention to process a plurality of packets in parallel using these configurations. This will be explained in detail.

도 2에 도시된 바와 같이, 본 발명의 가상스위치(100)는 벡터생성부(110), 제1해싱부(120), 제2해싱부(130) 및 검증부(140)를 포함하여 구성될 수 있으며, 본 발명의 벡터생성부(110)는 선별부(111), 연산부(113) 및 생성부(115)를 포함하여 구성될 수 있고, 본 발명의 제2해싱부(130)는 제1로드부(131), 제2로드부(133) 및 도출부(135)를 포함하여 구성될 수 있다.As shown in FIG. 2, the virtual switch 100 of the present invention may include a vector generator 110, a first hashing unit 120, a second hashing unit 130, and a verification unit 140. The vector generation unit 110 of the present invention may include a selection unit 111, a calculation unit 113, and a generation unit 115, and the second hashing unit 130 of the present invention may include a first unit. The rod unit 131, the second rod unit 133, and the lead unit 135 may be configured to be included.

도 2에는 Open Flow Table(200)이 가상스위치(100) 외부에 위치하는 것으로 표현되어 있으나, 이는 도 2에 도시된 본 발명의 각 내부 구성들이 가상스위치(100)의 Megaflow cache 내에 위치하는 것을 나타내기 위한 표현이다.In FIG. 2, the Open Flow Table 200 is represented as being located outside the virtual switch 100, but this indicates that each of the internal components of the present invention shown in FIG. 2 is located in the Megaflow cache of the virtual switch 100. It is an expression to bet.

즉, 전술된 바와 같이, 본 발명은 Megaflow cache의 자체 기능이 더욱 신속하게 수행되도록 하여 종래 가상스위치를 가속화시키는 것을 목적으로 하므로, 도 2에 도시된 본 발명의 각 내부 구성들은 Megaflow cache 내에 위치하는 것으로 보는 것이 바람직하다.That is, as described above, the present invention aims to speed up the conventional virtual switch by allowing the self-function of the Megaflow cache to be performed more quickly, so that each internal configuration of the present invention shown in FIG. 2 is located in the Megaflow cache. It is desirable to see that.

먼저, 외부로부터 본 발명의 벡터생성부(110)로 n개의 패킷이 수신된다(S310). 여기서, 본 발명은 복수 개의 패킷을 병렬적으로 처리하여 패킷 처리에 대한 시간적 효율성을 향상시키는 발명에 해당하므로, n은 2이상의 자연수를 의미한다.First, n packets are received from the outside to the vector generator 110 of the present invention (S310). Here, the present invention corresponds to the invention for improving the time efficiency for packet processing by processing a plurality of packets in parallel, n means a natural number of two or more.

본 발명의 벡터생성부(110)는 수신된 n개의 패킷을 대상으로 병렬 마스킹(masking)을 수행하여 하나 이상의 벡터를 생성한다(S320). 생성되는 벡터의 개수는 후술되는 마스크 미니플로우(mask miniflow)에서 마스크 값(mask value)이 존재함을 나타내는 비트의 개수와 동일하며, 이에 대한 상세한 설명은 후술하도록 한다.The vector generator 110 of the present invention generates one or more vectors by performing parallel masking on the received n packets (S320). The number of generated vectors is the same as the number of bits indicating the presence of a mask value in a mask miniflow to be described later, which will be described later.

후술되는 바와 같이, 마스킹은 n개의 패킷 값 각각과 마스크 값을 연산하여 목적하는 위치에 배치된 패킷 값을 도출하는 방법을 의미한다. 또한, 벡터는 마스킹 수행의 결과 값들이 1차원적으로 배열된 어레이, 프레임 또는 스트림(stream)을 의미한다.As will be described later, masking means a method of deriving a packet value arranged at a desired position by calculating each of the n packet values and the mask value. In addition, the vector refers to an array, a frame or a stream in which the values of masking are arranged one-dimensionally.

일반적인 Megaflow cache를 기준으로 하면, 마스킹 수행으로 인하여 도출되는 결과 값들은 각각 64비트의 데이터 크기를 가지는 정수 값들에 해당할 수 있다.Based on the general megaflow cache, the result values obtained by performing masking may correspond to integer values having a data size of 64 bits.

하나 이상의 벡터가 생성되면, 본 발명의 제1해싱부(120)는 하나 이상의 벡터 각각을 대상으로 미리 설정된 해시함수를 적용하여 n개의 해시 값을 도출한다(S330). 벡터에 해시함수가 적용되어 해시 값이 도출되므로, 전술된 벡터는 해시 키(hash key)로 볼 수 있다.When one or more vectors are generated, the first hashing unit 120 of the present invention derives n hash values by applying a predetermined hash function to each of the one or more vectors (S330). Since the hash function is applied to the vector to derive the hash value, the above-described vector may be regarded as a hash key.

해시 값이 생성되면, 본 발명의 제2해싱부(130)는 하나 이상의 해시 테이블(hash table)에 저장된 해시 키들 중 제1해싱부(120)에서 도출된 해시 값과 매칭되는 해시 키를 조회(lookup)하고, 매칭되는 해시 키 각각과 매핑 또는 연계되어 있는 n개의 매칭 룰을 도출한다(S340). When the hash value is generated, the second hashing unit 130 of the present invention inquires a hash key matching the hash value derived from the first hashing unit 120 among the hash keys stored in one or more hash tables. lookup) and n matching rules are mapped or associated with each matching hash key (S340).

매칭 룰이 도출되면, 본 발명의 검증부(140)는 매칭 룰이 실제 매칭되는 해시 키와 일치하는 지 여부를 검사하고(S350), 일치하는 경우 Action을 수행하며(S370), 일치하지 않는 경우 Open Flow Table(200)에서 패킷 처리가 수행되도록 해당 패킷을 Open Flow Table(200)로 전달하거나(S360), 자체적으로 추가적인 조회를 수행하기 위하여 다른 해시 테이블로 전달할 수 있다(S365).When the matching rule is derived, the verification unit 140 of the present invention checks whether the matching rule matches the hash key that is actually matched (S350), performs an action when it matches (S370), and does not match. The packet may be transferred to the Open Flow Table 200 so that packet processing is performed in the Open Flow Table 200 (S360), or it may be transferred to another hash table to perform an additional inquiry by itself (S365).

여기서, Action이란 해당 패킷을 미리 설정된 목적지로 전송하는 것을 의미한다. 이하에서는 특정 패킷을 이 특정 패킷의 미리 설정된 목적지로 전송하는 것을 나타내기 위하여 Action을 사용하도록 한다.Here, Action means transmitting the packet to a preset destination. Hereinafter, an Action is used to indicate that a specific packet is transmitted to a predetermined destination of the specific packet.

도 4는 벡터 생성을 위해 활용되는 패킷 미니플로우(packet miniflow)와 마스크 미니플로우의 일 예를 나타낸 도면이며, 도 5는 벡터 생성에 대한 본 발명의 일 예를 설명하기 위한 도면이고, 도 6은 벡터 생성에 대한 본 발명의 일 실시예를 설명하기 위한 흐름도이다.4 is a diagram illustrating an example of a packet miniflow and a mask miniflow utilized for vector generation, FIG. 5 is a diagram for explaining an example of the present invention for vector generation, and FIG. A flowchart for explaining an embodiment of the present invention for vector generation.

이하에서는, 도 4 내지 6을 참조하여, n개의 패킷을 대상으로 병렬 마스킹을 수행하여 하나 이상의 벡터를 생성하는 본 발명의 실시예에 대해 상세히 설명하도록 한다.Hereinafter, an embodiment of the present invention for generating one or more vectors by performing parallel masking on n packets will be described in detail with reference to FIGS. 4 to 6.

하나 이상의 벡터를 생성하기 위하여, 본 발명의 벡터생성부(110)는 도 2에 도시된 바와 같이, 선별부(111), 연산부(113) 및 생성부(115)를 포함하여 구성될 수 있다.In order to generate one or more vectors, the vector generator 110 of the present invention may include a selector 111, a calculator 113, and a generator 115, as shown in FIG. 2.

먼저, 본 발명의 선별부(111)는 마스크 미니플로우(mask miniflow)로부터 제1비트 값을 가지는 하나 이상의 마스크 비트를 선별한다. 선별 대상에 해당하지 않는 다른 비트 값과 구별될 수 있다면, 선별 대상에 해당하는 제1비트 값을 1 또는 0 중 어느 하나의 값으로 이루어질 수 있다. 이하에서는, 선별 대상에 해당하는 제1비트 값이 1로 이루어지는 실시예를 중심으로 설명하도록 한다.First, the selector 111 of the present invention selects one or more mask bits having a first bit value from a mask miniflow. If it can be distinguished from other bit values that do not correspond to the screening target, the first bit value corresponding to the screening target may be one of 1 or 0. In the following description, an embodiment in which the first bit value corresponding to the selection target is 1 will be described.

미니플로우는 플로우 구조의 압축된 형태를 의미하므로, 마스크 미니플로우는 마스크 플로우 구조의 압축된 형태에 해당하고, 후술되는 패킷 미니플로우는 패킷 즉, 패킷 헤더 구조의 압축된 형태에 해당한다.Since the miniflow means a compressed form of the flow structure, the mask miniflow corresponds to the compressed form of the mask flow structure, and the packet miniflow described later corresponds to the compressed form of the packet, that is, the packet header structure.

또한, 각각의 미니플로우는 도 4에 표현된 바와 같이 비트 맵 형태로 이루어질 수 있으며, 0 비트는 플로우 구조에서 대응되는 필드가 0(존재하지 않음)으로 설정되어 있음을 지시하고, 1 비트는 플로우 구조에서 대응되는 필드가 0이 아닌 값으로 설정되어 있음을 지시할 수 있다. In addition, each miniflow may be in the form of a bit map as shown in FIG. 4, where 0 bits indicate that a corresponding field is set to 0 (not present) in a flow structure, and 1 bit is a flow. It may indicate that the corresponding field in the structure is set to a non-zero value.

따라서, 미니플로우는 플로우 구조 중 미니플로우를 구성하는 각각의 비트와 대응되는 필드에 0이 아닌 다른 값이 존재하는 지 여부를 지시하는 기능을 수행할 수 있다. Therefore, the miniflow may perform a function of indicating whether a value other than 0 exists in a field corresponding to each bit constituting the miniflow in the flow structure.

도 4 및 도 5를 기준으로 미니플로우에 대한 예를 설명하면, 마스크 미니플로우의 경우, 우측에서 좌측 방향으로 총 4개의 비트가 1 비트로 표현되어 있으므로(도 4), 마스크 플로우 구조를 표현하면 도 5의 상단에 표현된 바와 같이 좌측에서 우측 방향으로 0이 아닌 다른 값(Mask value 0 내지 Mask value 3)이 마스크 값으로 배열될 수 있다.Referring to FIGS. 4 and 5, an example of a miniflow will be described. In the case of a mask miniflow, a total of four bits are represented by one bit in a right-to-left direction (FIG. 4). As expressed at the top of 5, a non-zero value (Mask value 0 to Mask value 3) in the left to right direction may be arranged as a mask value.

또한, 패킷 미니플로우 0의 경우, 우측에서 좌측 방향으로 총 5개의 비트가 1 비트로 표현되어 있으므로(도 4), 도 5의 상단에 표현된 바와 같이 좌측에서 우측 방향으로 0이 아닌 다른 값이 패킷 값(Packet value 0-0 내지 Packet value 0-4)으로 배열될 수 있다.In addition, in case of packet miniflow 0, a total of 5 bits are represented by 1 bit from the right to the left direction (FIG. 4), and thus, a value other than 0 from the left to the right direction is expressed as shown at the top of FIG. 5. It may be arranged in a value (Packet value 0-0 to Packet value 0-4).

미니플로우가 이와 같이 구성된 상태에서, 본 발명의 선별부(111)는 마스크 미니플로우의 k(k는 0 이상 마스크 미니플로우의 비트 수 이하인 정수)번째 비트가 1에 해당하는 지 여부를 판단한다(S610).In the state in which the miniflow is configured in this way, the selector 111 of the present invention determines whether the k-th (k is an integer equal to 0 or less than the number of bits of the mask miniflow) of the mask miniflow corresponds to 1 ( S610).

k번째 비트가 0인 경우, 이는 k번째 미니플로우 비트에 대응되는 마스크 값이 존재하지 않음(0)을 의미하므로(k번째 미니플로우 비트가 제1비트 값에 해당하지 않으므로), 본 발명의 선별부(111)는 다음 비트에 대한 판단을 수행한다(S620).If the kth bit is 0, this means that there is no mask value corresponding to the kth miniflow bit (0) (since the kth miniflow bit does not correspond to the first bit value), so that the selection of the present invention The unit 111 performs determination on the next bit (S620).

이러한 과정을 반복적으로 수행하여 1 비트에 해당하는 마스크 미니플로우 비트(마스크 비트)가 선별되면(S630), 본 발명의 선별부(111)는 n개의 패킷 미니플로우의 비트들 중 마스크 비트와 동일한 위치에 배열된 패킷 미니플로우 비트들 중 패킷 비트를 선별한다.When the mask miniflow bit (mask bit) corresponding to 1 bit is selected by repeatedly performing this process (S630), the selector 111 of the present invention is the same position as the mask bit among the bits of the n packet miniflows. Selects the packet bit among the packet miniflow bits arranged in the.

구체적으로, 본 발명의 선별부(113)는 먼저, 마스크 비트와 동일한 위치에 배열된 패킷 미니플로우 비트가 마스크 비트와 동일한 비트 값인 1 비트 값을 가지는 여부를 판단하고(S640), 1 비트 값을 가지는 패킷 미니플로우 비트를 패킷 비트로 선별한다(S650).Specifically, the selector 113 of the present invention first determines whether a packet miniflow bit arranged at the same position as the mask bit has a 1-bit value that is the same bit value as the mask bit (S640), and selects a 1-bit value. The branched packet miniflow bits are selected as packet bits (S650).

비트 선별이 완료되면, 본 발명의 연산부(113)는 마스크 비트와 매핑된 마스크 값 및 패킷 비트와 매핑된 패킷 값을 대상으로 병렬 AND 연산을 수행하고(S660), 본 발명의 생성부(115)는 병렬 AND 연산의 결과와 0을 순차적으로 배열하여 하나 이상의 벡터를 생성한다(S680).When bit selection is completed, the operation unit 113 of the present invention performs a parallel AND operation on the mask value mapped to the mask bit and the packet value mapped to the packet bit (S660), and the generation unit 115 of the present invention. Sequentially arranges the result of the parallel AND operation and 0 to generate one or more vectors (S680).

벡터 생성에 이용되는 0은 마스크 비트와 동일한 위치에 배열된 패킷 미니플로우 비트가 마스크 비트와 동일하지 않은 비트 값인 0 비트 값을 가지는 경우, 벡터의 해당 위치를 0으로 설정하는 것을 의미한다.0 used for vector generation means that a corresponding position of the vector is set to 0 when a packet miniflow bit arranged at the same position as the mask bit has a zero bit value that is a bit value not equal to the mask bit.

일반적인 Megaflow cache(AND 연산을 통하여 도출되는 결과 값들이 각각 64비트의 데이터 크기를 가지는 정수 값인 경우)를 기준으로 하면, 벡터는 64비트의 정수 값이 n개 배열된 64*n 비트로 구성될 수 있다.Based on the general Megaflow cache (when the result values derived from the AND operation are integer values each having a 64-bit data size), the vector may consist of 64 * n bits in which n 64-bit integer values are arranged. .

실시형태에 따라, 32*n 비트로 한정된 벡터를 구성하고자 하는 경우, 단일의 64*n 비트 벡터에 배열될 수 있는 AND 연산 결과들은 두 개의 32*n 비트 벡터에 배열될 수 있다.According to an embodiment, if one wishes to construct a vector defined as 32 * n bits, the results of AND operations that can be arranged in a single 64 * n bit vector can be arranged in two 32 * n bit vectors.

병렬 AND 연산 과정과 벡터 생성 과정에 대해 도 4 및 도 5를 참조하여 예시적으로 설명하면 다음과 같다. A parallel AND operation process and a vector generation process will be described with reference to FIGS. 4 and 5 as follows.

먼저, 우측에서 좌측 방향을 기준으로, 마스크 미니플로우가 7번째, 10번째, 11번째 및 13번째 비트에서 1 비트 값(제1비트 값)을 가지므로, 이 비트들이 마스크 비트로 선별된다.First, based on the right to left direction, since the mask miniflow has one bit value (first bit value) in the seventh, tenth, eleventh, and thirteenth bits, these bits are selected as mask bits.

또한, 패킷 미니플로우 각각의 7번째, 10번째, 11번째 및 13번째 비트들 중 1 비트 값(제1비트 값)을 가지는 비트들(Packet miniflow 0의 경우 10번째 및 11번째 비트, Packet miniflow 1의 경우 7번째 및 11번째 비트, Packet miniflow 15의 경우 13번째 비트)이 패킷 비트로 선별된다.In addition, bits having a bit value (first bit value) of the seventh, tenth, eleventh, and thirteenth bits of the packet miniflow, respectively (the tenth and eleventh bits in the case of packet miniflow 0, and the packet miniflow 1). In the case of the 7th and 11th bits, and the 13th bit in the case of Packet miniflow 15), the packet bits are selected.

다음으로, 도 5에 도시된 바와 같이, 1번째 마스크 비트(7번째 마스크 미니플로우 비트)와 매핑된 마스크 값(Mask value 0) 및 패킷 미니플로우 1의 7번째 비트인 마스크 비트와 매핑된 패킷 값(Packet value 1-1)을 대상으로 AND 연산이 수행되고, AND 연산의 결과가 Vertor 0의 2번째 슬롯에 배열되며, 나머지 슬롯들에는 0이 배열되게 된다. Next, as shown in FIG. 5, a mask value mapped to the first mask bit (the seventh mask miniflow bit) (Mask value 0) and a packet value mapped to the mask bit that is the seventh bit of packet miniflow 1 are mapped. The AND operation is performed on (Packet value 1-1), the result of the AND operation is arranged in the second slot of Vertor 0, and 0 is arranged in the remaining slots.

또한, 2번째 마스크 비트(10번째 마스크 미니플로우 비트)와 매핑된 마스크 값(Mask value 1) 및 패킷 미니플로우 1의 10번째 비트인 마스크 비트와 매핑된 패킷 값(Packet value 0-2)을 대상으로 AND 연산이 수행되고, AND 연산의 결과가 Vertor 1의 1번째 슬롯에 배열되며, 나머지 슬롯들에는 0이 배열되게 된다.In addition, a mask value (Mask value 1) mapped to the second mask bit (the tenth mask miniflow bit) and a packet value mapped to the mask bit (the packet value 0-2) mapped to the tenth bit of the packet miniflow 1 are targeted. The AND operation is performed, and the result of the AND operation is arranged in the first slot of Vertor 1, and 0 is arranged in the remaining slots.

나아가, 3번째 마스크 비트(11번째 마스크 미니플로우 비트)와 매핑된 마스크 값(Mask value 2) 및 패킷 미니플로우 0의 11번째 비트인 마스크 비트와 매핑된 패킷 값(Packet value 0-3)을 대상으로 AND 연산이 수행되고, AND 연산의 결과가 Vertor 2의 1번째 슬롯에 배열된다.Furthermore, the mask value (Mask value 2) mapped with the 3rd mask bit (the 11th mask miniflow bit) and the packet value (Packet value 0-3) mapped with the mask bit which is the 11th bit of packet miniflow 0 are targeted. The AND operation is performed, and the result of the AND operation is arranged in the first slot of Vertor 2.

이와 동시적으로, 3번째 마스크 비트(11번째 마스크 미니플로우 비트)와 매핑된 마스크 값(Mask value 2) 및 패킷 미니플로우 1의 11번째 비트인 마스크 비트와 매핑된 패킷 값(Packet value 1-2)을 대상으로 AND 연산이 수행되고, AND 연산의 결과가 Vertor 2의 2번째 슬롯에 배열되며, Vector 2의 나머지 슬롯들에는 0이 배열되게 된다.At the same time, the mask value mapped to the 3rd mask bit (the 11th mask miniflow bit) (Mask value 2) and the packet value mapped to the mask bit (11th bit of packet miniflow 1) (Packet value 1-2) The AND operation is performed on), the result of the AND operation is arranged in the second slot of Vertor 2, and 0 is arranged in the remaining slots of Vector 2.

더 나아가, 4번째 마스크 비트(13번째 마스크 미니플로우 비트)와 매핑된 마스크 값(Mask value 3) 및 패킷 미니플로우 15의 13번째 비트인 마스크 비트와 매핑된 패킷 값(Packet value 15-3)을 대상으로 AND 연산이 수행되고, AND 연산의 결과가 Vertor 3의 4번째 슬롯에 배열되며, Vector 3의 나머지 슬롯들에는 0이 배열되게 된다.Furthermore, the mask value (Mask value 3) mapped with the fourth mask bit (13th mask miniflow bit) and the packet value (Packet value 15-3) mapped with the mask bit, which is the 13th bit of packet miniflow 15, are mapped. The AND operation is performed on the object, and the result of the AND operation is arranged in the fourth slot of Vertor 3, and 0 is arranged in the remaining slots of Vector 3.

이러한 과정이 패킷 값 0 내지 15에 대하여 병렬적(동시적)으로 수행되어 도 5의 하단에 도시된 바와 같은 벡터들이 생성되게 된다. 도 4 및 도 5는 총 16개(n=16)의 패킷이 입력되는 경우를 가정하여 병렬 AND 연산 과정과 벡터 생성 과정을 설명하는 도면에 해당한다. 따라서, 입력되는 패킷의 개수에 따라 도 5의 하단에 도시된 벡터 내 슬롯의 개수가 가변될 수 있음은 물론이다.This process is performed in parallel (simultaneously) for packet values 0-15, resulting in vectors as shown at the bottom of FIG. 4 and 5 correspond to a diagram illustrating a parallel AND operation process and a vector generation process on the assumption that a total of 16 packets (n = 16) are input. Therefore, the number of slots in the vector shown at the bottom of FIG. 5 may vary according to the number of input packets.

도 4 및 도 5에서 표현된 바와 같이, 생성되는 벡터들의 개수는 마스크 미니플로우에 포함된 1 비트 값의 개수 즉, 제1비트의 개수와 동일하다. 따라서, 마스크 미니플로우에 포함된 제1비트의 개수가 도면에 포함된 제1비트의 개수와 상이한 경우, 생성되는 벡터의 개수 또한, 상이해질 수 있다.As represented in FIGS. 4 and 5, the number of generated vectors is equal to the number of 1-bit values included in the mask miniflow, that is, the number of first bits. Therefore, when the number of first bits included in the mask miniflow is different from the number of first bits included in the figure, the number of generated vectors may also be different.

전술된 바와 같이, 본 발명의 제1해싱부(120)는 벡터생성부(110)에서 생성된 벡터를 대상으로(해시 키로 하여) 해시함수를 적용하여 n개의 해시 값을 도출하도록 구성된다. As described above, the first hashing unit 120 of the present invention is configured to derive n hash values by applying a hash function (as a hash key) to the vector generated by the vector generation unit 110.

따라서, 벡터의 개수가 가변될 수 있음을 감안하면, 해시함수는 해시 키의 개수 변화에 적응성이 높은(해시 충돌을 낮출 수 있는) murmur 해시함수로 이루어지는 것이 바람직하다. Therefore, considering that the number of vectors can be varied, the hash function is preferably made of a murmur hash function that is adaptive to the change in the number of hash keys (which can lower hash collisions).

이와 같이, 본 발명은 AND 연산 과정과 벡터 생성 과정이 병렬적(동시적)으로 수행되도록 구성되므로, 복수 개의 패킷에 대한 처리를 직렬적으로 수행하는 종래 가상스위치에 비해 더욱 높은 가속화 효과를 제공할 수 있다.As described above, the present invention is configured such that the AND operation process and the vector generation process are performed in parallel (simultaneously), thereby providing a higher acceleration effect than the conventional virtual switch which performs the processing on a plurality of packets in series. Can be.

또한, 본 발명은 병렬 연산을 통해 가상 스위치(100)의 리소스 대부분을 차지하는 Megaflow cache를 가속화시킬 수 있으므로, 가속화 효과가 미치는 영향을 더욱 증대시킬 수 있다.In addition, the present invention can accelerate the Megaflow cache that occupies most of the resources of the virtual switch 100 through parallel operation, thereby further increasing the effect of the acceleration effect.

도 7은 해시 테이블 조회에 대한 본 발명의 일 실시예를 설명하기 위한 도면이며, 도 8은 해시 테이블 조회에 대한 본 발명의 일 실시예를 설명하기 위한 흐름도이다. 이하에서는, 도 7 및 도 8을 참조하여 해시 테이블 조회에 대한 본 발명의 일 실시예에 대해 상세히 설명하도록 한다.7 is a diagram illustrating an embodiment of the present invention for a hash table query, and FIG. 8 is a flowchart illustrating an embodiment of the present invention for a hash table query. Hereinafter, an embodiment of the present invention for hash table inquiry will be described in detail with reference to FIGS. 7 and 8.

본 발명의 제2해싱부(130)에는 하나 이상의 해시 테이블이 저장되며, 이 해시 테이블에는 도 7에 도시된 바와 같이 하나 이상의 룰(rule)(P1, P2, P3, P4 및 P5)과 하나 이상의 룰 각각에 대한 해시 값이 배열될 수 있다.One or more hash tables are stored in the second hashing unit 130 of the present invention, and the one or more rules P1, P2, P3, P4 and P5 and one or more hash tables are shown in FIG. Hash values for each rule can be arranged.

룰 각각에 대한 해시 값들은 제1해싱부(120)로부터 도출된 해시 값들과 동일한 값을 가질 수 있으며, 룰들은 자신과 매칭되는 해시 값과 매핑되어 배열된다.The hash values for each rule may have the same values as the hash values derived from the first hashing unit 120, and the rules are mapped to the hash values matching the rules.

도 7에서, 해시 테이블로 입력되는(해시 테이블에서 조회되는) K4는 제1해싱부(120)로부터 도출된 n개의 해시 값들 중 조회 대상에 해당하는 어느 하나의 해시 값을 나타낸다. 이하에서는 n개의 해시 값들 중 조회 대상에 해당하는 해시 값을 대상 해시 값(K4)이라 지칭한다.In FIG. 7, K4 input to the hash table (inquired in the hash table) represents one hash value corresponding to the search object among the n hash values derived from the first hashing unit 120. Hereinafter, a hash value corresponding to an inquiry target among n hash values is referred to as a target hash value K4.

도 7에 도시된 바와 같이, 본 발명의 제1로드부(131)는 대상 해시 값(K4)을 복수 개의 슬롯으로 구성된 제1벡터(모든 슬롯에 K4가 배열된 프레임)의 모든 슬롯에 로드한다(S810). 즉, 대상 해시 값(K4)은 제1벡터를 구성하는 모든 슬롯들에 배열된다.As shown in FIG. 7, the first load unit 131 of the present invention loads the target hash value K4 into all slots of a first vector (frame in which K4 is arranged in all slots) including a plurality of slots. (S810). In other words, the target hash value K4 is arranged in all slots constituting the first vector.

또한, 본 발명의 제2로드부(133)는 해시 테이블에 포함된 하나 이상의 버켓(bucket) 중 대상 해시 값(K4)이 포함된 버켓(K1, K2, K3, K4, K5)을 복수 개의 슬롯으로 구성된 제2벡터에 로드한다(S820).In addition, the second rod 133 of the present invention includes a plurality of slots including buckets K1, K2, K3, K4, and K5 including a target hash value K4 among one or more buckets included in the hash table. It is loaded in the second vector consisting of (S820).

단, 이 경우, 제2로드부(133)는 해당 버켓(K1, K2, K3, K4, K5)을 도 7에 도시된 바와 같이 제2벡터의 우측 끝단 슬롯으로부터 순차적으로 로드하거나, 제2벡터의 좌측 끝단 슬롯으로부터 순차적으로 로드한다(S820).In this case, the second rod unit 133 sequentially loads the buckets K1, K2, K3, K4, and K5 from the slots at the right end of the second vector, as shown in FIG. Load sequentially from the left end of the slot (S820).

버켓(K1, K2, K3, K4, K5)을 제2벡터의 우측 또는 좌측 끝단 슬롯으로부터 로드하는 이유는, 대상 해시 값(K4)의 상대적인 위치를 정확하게 파악하기 위함이다.The reason for loading the buckets K1, K2, K3, K4, K5 from the right or left end slot of the second vector is to accurately grasp the relative position of the target hash value K4.

이와 같이 구성된 상태에서, 본 발명의 도출부(135)는 먼저, 제2벡터에 포함된 슬롯들 중 제1벡터에 포함된 슬롯과 동일한 값(해시 값)을 가지는 슬롯인 대상 슬롯을 선별한다(S830).In this configuration, the derivation unit 135 of the present invention first selects a target slot that is a slot having the same value (hash value) as the slot included in the first vector among the slots included in the second vector ( S830).

전술된 바와 같이, 제1벡터에는 대상 해시 값(K4)이 모든 슬롯에 로드되어 있고, 제2벡터에는 버켓(K1, K2, K3, K4, K5)이 로드되어 있으므로, 상호 동일한 위치에 배열된 제1벡터의 슬롯들과 제2벡터의 슬롯들을 비교하면 도 7에 도시된 비트 맵이 구성될 수 있다.As described above, since the target hash value K4 is loaded in all slots in the first vector, and the buckets K1, K2, K3, K4, and K5 are loaded in the second vector, they are arranged in the same position. Comparing the slots of the first vector and the slots of the second vector, the bit map shown in FIG. 7 may be configured.

이 비트 맵에서, 0 비트 값은 상호 동일한 위치에 배열된 제1벡터의 슬롯과 제2벡터의 슬롯에 동일하지 않은 값이 배열되어 있음을 의미하며, 1 비트 값은 상호 동일한 위치에 배열된 제1벡터의 슬롯과 제2벡터의 슬롯에 동일한 값이 배열되어 있음을 의미한다. 따라서, 본 발명의 도출부(135)는 비트 맵에서 1비트 값이 배열된 슬롯을 위치를 이용하여 대상 슬롯을 선별할 수 있다.In this bitmap, a zero bit value means that a non-identical value is arranged in a slot of a first vector and a slot of a second vector arranged at the same position, and a one bit value is a zero value arranged in the same position. It means that the same value is arranged in the slot of the 1 vector and the slot of the second vector. Accordingly, the derivation unit 135 of the present invention may select a target slot using a slot in which a 1-bit value is arranged in the bitmap.

대상 슬롯이 선별되면, 본 발명의 도출부(135)는 대상 슬롯의 인덱스정보에 해당하는 매칭 룰을 해시 테이블로부터 선별한다(S840). 대상 슬롯의 인덱스정보란, 제1벡터, 제2벡터 또는 비트 맵에서 대상 슬롯이 배열된 상대적인 위치를 의미한다.When the target slot is selected, the derivation unit 135 of the present invention selects a matching rule corresponding to the index information of the target slot from the hash table (S840). The index information of the target slot means a relative position where the target slot is arranged in the first vector, the second vector, or the bit map.

도 7에 도시된 바와 같이, 대상 슬롯은 우측에서 좌측 방향으로 비트 맵의 4번째 슬롯 또는 비트에 배열되어 있으므로, 본 발명의 도출부(135)는 해시 테이블의 좌측에서 우측 방향으로 기준으로 4번째 슬롯에 위치한 룰(P4)을 매칭 룰로 선별한다(S840). 매칭 룰이 선별되면, 본 발명의 도출부(135)는 선별된 매칭 룰(P4)을 반환(S850)함으로써 매칭 룰 도출 과정을 마무리 짓는다. As shown in FIG. 7, since the target slot is arranged in the fourth slot or bit of the bit map in the right-to-left direction, the derivation unit 135 of the present invention is the fourth in the left-to-right direction of the hash table. The rule P4 located in the slot is selected as a matching rule (S840). When the matching rule is selected, the derivation unit 135 of the present invention returns the selected matching rule P4 (S850) to complete the matching rule derivation process.

이와 같이, 본 발명은 대상 해시 값 로딩, 버켓 로딩을 이용한 단일 번의 조회를 통해 대상 해시 값에 대응되는 매칭 룰을 도출하도록 구성되므로, 해시 테이블을 복수 회 조회하여 대상 해시 값과 매칭되는 값을 선별하는 종래 방법에 비해 연산의 효율성을 증가시킬 수 있다.As described above, since the present invention is configured to derive a matching rule corresponding to the target hash value through a single query using the target hash value loading and the bucket loading, the hash table is searched a plurality of times to select a value matching the target hash value. Computation efficiency can be increased as compared to the conventional method.

이러한 연산의 효율성은 Megaflow cache 자체의 가속화로 이어지며, Megaflow cache에 소요되는 리소스가 가상 스위치(100)의 전체 리소스 중 많은 부분을 차지한다는 측면에서, 본 발명은 더욱 높은 가속화 효과를 제공할 수 있다.The efficiency of this operation leads to the acceleration of the Megaflow cache itself, and the present invention can provide a higher acceleration effect in that the resources consumed in the Megaflow cache occupy a large part of the total resources of the virtual switch 100. .

도 3, 도 6 및 도 8에서는 과정 S310 내지 과정 S370, 과정 S610 내지 과정 S680 및 과정 S810 내지 S850을 순차적으로 실행하는 것으로 기재하고 있으나, 이는 본 발명의 일 실시예의 기술 사상을 예시적으로 설명한 것에 불과한 것이다. 다시 말해, 본 발명의 일 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 일 실시예의 본질적인 특성에서 벗어나지 않는 범위에서 도 3, 도 6 및 도 8에 기재된 순서를 변경하여 실행하거나 과정 S310 내지 과정 S370, 과정 S610 내지 과정 S680 및 과정 S810 내지 S850 중 하나 이상의 과정을 병렬적으로 실행하는 것으로 다양하게 수정 및 변형하여 적용 가능할 것이므로, 도 6은 시계열적인 순서로 한정되는 것은 아니다.In FIGS. 3, 6 and 8, the processes S310 to S370, the S610 to S680, and the S810 to S850 are sequentially executed. However, the technical idea of the exemplary embodiment of the present invention is exemplarily described. It is only. In other words, one of ordinary skill in the art to which an embodiment of the present invention belongs may execute the process by changing the order described in FIGS. 3, 6 and 8 without departing from the essential characteristics of the embodiment of the present invention. Since one or more of S310 to S370, S610 to S680, and S810 to S850 may be applied in various modifications and modifications in parallel, FIG. 6 is not limited to the time series order.

한편, 도 3, 도 6 및 도 8에 도시된 과정들은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 즉, 컴퓨터가 읽을 수 있는 기록매체는 마그네틱 저장매체(예를 들면, 롬, 플로피 디스크, 하드디스크 등), 광학적 판독 매체(예를 들면, 시디롬, 디브이디 등) 및 캐리어 웨이브(예를 들면, 인터넷을 통한 전송)와 같은 저장매체를 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.Meanwhile, the processes illustrated in FIGS. 3, 6, and 8 may be implemented as computer readable codes on a computer readable recording medium. The computer-readable recording medium includes all kinds of recording devices in which data that can be read by a computer system is stored. That is, the computer-readable recording medium may be a magnetic storage medium (for example, a ROM, a floppy disk, a hard disk, etc.), an optical reading medium (for example, a CD-ROM, DVD, etc.) and a carrier wave (for example, the Internet Storage medium). The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.

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

100: 가상 스위치
110: 벡터생성부 120: 제1해싱부
140: 검증부 130: 제2해싱부
111: 선별부 113: 연산부
115: 생성부 131: 제1로드부
133: 제2로드부 135: 도출부
100: virtual switch
110: vector generation unit 120: first hashing unit
140: verification unit 130: second hashing unit
111: selection unit 113: calculation unit
115: generation unit 131: first load unit
133: second rod portion 135: derivation portion

Claims (8)

오픈 가상 스위치(Open Virtual Switch)에서 수행되는 패킷(packet) 처리 방법으로서,
외부로부터 수신된 n(n은 2이상의 자연수)개의 패킷을 대상으로 병렬(parallel) 마스킹(masking)을 수행하여 하나 이상의 벡터를 생성하는 단계;
상기 벡터를 대상으로 해시함수를 적용하여 n개의 해시 값을 도출하는 단계; 및
하나 이상의 해시 테이블을 대상으로 상기 해시 값 각각을 조회(lookup)하여 상기 해시 값 각각과 매핑된 n개의 매칭 룰(rule)을 도출하는 단계를 포함하고,
상기 매칭 룰을 도출하는 단계는,
상기 해시 값 중 조회 대상에 해당하는 대상 해시 값을 복수 개의 슬롯(slot)으로 구성된 제1벡터의 모든 슬롯에 로드(load)하는 단계;
상기 해시 테이블에 포함된 하나 이상의 버켓(bucket) 중 상기 대상 해시 값이 포함된 버켓을 복수 개의 슬롯으로 구성된 제2벡터에 로드하되, 상기 제2벡터의 우측 또는 좌측 끝단에 위치한 슬롯으로부터 순차적으로 로드하는 단계; 및
상기 제2벡터의 슬롯들 중 상기 제1벡터의 슬롯과 동일한 값을 가지는 대상 슬롯을 선별하고, 상기 해시 테이블로부터 상기 대상 슬롯의 인덱스정보에 해당하는 상기 매칭 룰을 도출하는 단계를 포함하는 것을 특징으로 하는 병렬 연산을 이용한 오픈 가상 스위치의 가속화 방법.
A packet processing method performed in an open virtual switch,
Generating at least one vector by performing parallel masking on n (n is a natural number of two or more) packets received from the outside;
Deriving n hash values by applying a hash function to the vector; And
Looking up each of the hash values in at least one hash table to derive n matching rules mapped to each of the hash values,
Deriving the matching rule,
Loading a target hash value corresponding to an inquiry target among the hash values into all slots of a first vector including a plurality of slots;
Among the one or more buckets included in the hash table, the bucket including the target hash value is loaded into a second vector consisting of a plurality of slots, and sequentially loaded from slots located at right or left ends of the second vector. Doing; And
Selecting a target slot having the same value as the slot of the first vector among the slots of the second vector, and deriving the matching rule corresponding to the index information of the target slot from the hash table. Acceleration method of open virtual switch using parallel operation.
제1항에 있어서, 상기 벡터를 생성하는 단계는,
마스크 미니플로우(mask miniflow)로부터 제1비트 값을 가지는 하나 이상의 마스크 비트를 선별하고, n개의 패킷 미니플로우 각각에서 상기 마스크 비트와 동일한 위치에 배열된 비트들 중 상기 제1비트 값을 가지는 패킷 비트를 선별하는 단계;
상기 패킷 비트와 매핑된 패킷 값 각각 및 상기 마스크 비트와 매핑된 마스크 값을 대상으로 병렬 AND 연산을 수행하는 단계; 및
상기 병렬 AND 연산의 결과를 순차적으로 배열하여 상기 하나 이상의 벡터를 생성하는 단계를 포함하는 것을 특징으로 하는 오픈 가상 스위치의 가속화 방법.
The method of claim 1, wherein generating the vector comprises:
Selecting one or more mask bits having a first bit value from a mask miniflow, and each of the packet bits having the first bit value among the bits arranged at the same position as the mask bit in each of the n packet miniflows Screening;
Performing a parallel AND operation on each of the packet values mapped to the packet bits and a mask value mapped to the mask bits; And
And arranging the results of the parallel AND operations sequentially to generate the one or more vectors.
제2항에 있어서, 상기 해시함수는,
murmur 해시함수인 것을 특징으로 하는 병렬 연산을 이용한 오픈 가상 스위치의 가속화 방법.
The method of claim 2, wherein the hash function,
Acceleration method of an open virtual switch using parallel operation, characterized in that the murmur hash function.
삭제delete 오픈 가상 스위치(Open Virtual Switch)로서,
외부로부터 수신된 n(n은 2이상의 자연수)개의 패킷을 대상으로 병렬(parallel) 마스킹(masking)을 수행하여 하나 이상의 벡터를 생성하는 벡터생성부;
상기 벡터를 대상으로 해시함수를 적용하여 n개의 해시 값을 도출하는 제1해싱부; 및
하나 이상의 해시 테이블을 대상으로 상기 해시 값 각각을 조회(lookup)하여 상기 해시 값 각각과 매핑된 n개의 매칭 룰(rule)을 도출하는 제2해싱부를 포함하고,
상기 제2해싱부는,
상기 해시 값 중 조회 대상에 해당하는 대상 해시 값을 복수 개의 슬롯(slot)으로 구성된 제1벡터의 모든 슬롯에 로드(load)하는 제1로드부;
상기 해시 테이블에 포함된 하나 이상의 버켓(bucket) 중 상기 대상 해시 값이 포함된 버켓을 복수 개의 슬롯으로 구성된 제2벡터에 로드하되, 상기 제2벡터의 우측 또는 좌측 끝단에 위치한 슬롯으로부터 순차적으로 로드하는 제2로드부; 및
상기 제2벡터의 슬롯들 중 상기 제1벡터의 슬롯과 동일한 값을 가지는 대상 슬롯을 선별하고, 상기 해시 테이블로부터 상기 대상 슬롯의 인덱스정보에 해당하는 상기 매칭 룰을 도출하는 도출부를 포함하는 것을 특징으로 하는 병렬 연산에 기반한 오픈 가상 스위치.
As an Open Virtual Switch,
A vector generator for generating one or more vectors by performing parallel masking on n (n is a natural number of two or more) packets received from the outside;
A first hashing unit configured to derive n hash values by applying a hash function to the vector; And
A second hashing unit for looking up each hash value to one or more hash tables to derive n matching rules mapped to each of the hash values,
The second hashing unit,
A first load unit which loads a target hash value corresponding to a search target among the hash values into all slots of a first vector including a plurality of slots;
Among the one or more buckets included in the hash table, the bucket including the target hash value is loaded into a second vector consisting of a plurality of slots, and sequentially loaded from slots located at right or left ends of the second vector. A second rod unit; And
Selecting a target slot having the same value as the slot of the first vector among the slots of the second vector, and including a derivation unit for deriving the matching rule corresponding to the index information of the target slot from the hash table Open virtual switch based on parallel operation.
제5항에 있어서, 상기 벡터생성부는,
마스크 미니플로우(mask miniflow)로부터 제1비트 값을 가지는 하나 이상의 마스크 비트를 선별하고, n개의 패킷 미니플로우 각각에서 상기 마스크 비트와 동일한 위치에 배열된 비트들 중 상기 제1비트 값을 가지는 패킷 비트를 선별하는 선별부;
상기 패킷 비트와 매핑된 패킷 값 각각 및 상기 마스크 비트와 매핑된 마스크 값을 대상으로 병렬 AND 연산을 수행하는 연산부; 및
상기 병렬 AND 연산의 결과를 순차적으로 배열하여 상기 하나 이상의 벡터를 생성하는 생성부를 포함하는 것을 특징으로 하는 병렬 연산에 기반한 오픈 가상 스위치.
The method of claim 5, wherein the vector generation unit,
Selecting one or more mask bits having a first bit value from a mask miniflow, and each of the packet bits having the first bit value among the bits arranged at the same position as the mask bit in each of the n packet miniflows Selection unit for selecting the;
An operation unit configured to perform a parallel AND operation on each of the packet values mapped to the packet bits and a mask value mapped to the mask bits; And
And a generator configured to sequentially arrange the results of the parallel AND operation to generate the at least one vector.
제6항에 있어서, 상기 해시함수는,
murmur 해시함수인 것을 특징으로 하는 병렬 연산에 기반한 오픈 가상 스위치.
The method of claim 6, wherein the hash function,
Open virtual switch based on parallel operation, characterized by a murmur hash function.
삭제delete
KR1020180128958A 2018-10-26 2018-10-26 Method for accelerating open virtual switch using parallel computation and open virtual switch using the same KR102050828B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180128958A KR102050828B1 (en) 2018-10-26 2018-10-26 Method for accelerating open virtual switch using parallel computation and open virtual switch using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180128958A KR102050828B1 (en) 2018-10-26 2018-10-26 Method for accelerating open virtual switch using parallel computation and open virtual switch using the same

Publications (1)

Publication Number Publication Date
KR102050828B1 true KR102050828B1 (en) 2020-01-08

Family

ID=69154154

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180128958A KR102050828B1 (en) 2018-10-26 2018-10-26 Method for accelerating open virtual switch using parallel computation and open virtual switch using the same

Country Status (1)

Country Link
KR (1) KR102050828B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116450656A (en) * 2023-06-16 2023-07-18 北京数巅科技有限公司 Data processing method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004334297A (en) * 2003-04-30 2004-11-25 Asahi Kasei Corp Parallel operation processor and parallel operation processing method
KR20120112568A (en) * 2009-12-17 2012-10-11 알까뗄 루슨트 Method for processing a plurality of data and switching device for switching communication packets
JP2015039144A (en) * 2013-08-19 2015-02-26 富士通株式会社 Network system, control method therefor, network control device, and control program therefor
JP2016005286A (en) * 2014-06-19 2016-01-12 エックスプライアント, インコーポレイテッド Method of forming hash input from packet contents, and apparatus thereof
KR20170009961A (en) * 2014-05-30 2017-01-25 퀄컴 인코포레이티드 Multi-table hash-based lookups for packet processing
KR20180087673A (en) * 2017-01-25 2018-08-02 한국전자통신연구원 Method and apparatus for flow processing acceleration

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004334297A (en) * 2003-04-30 2004-11-25 Asahi Kasei Corp Parallel operation processor and parallel operation processing method
KR20120112568A (en) * 2009-12-17 2012-10-11 알까뗄 루슨트 Method for processing a plurality of data and switching device for switching communication packets
JP2015039144A (en) * 2013-08-19 2015-02-26 富士通株式会社 Network system, control method therefor, network control device, and control program therefor
KR20170009961A (en) * 2014-05-30 2017-01-25 퀄컴 인코포레이티드 Multi-table hash-based lookups for packet processing
JP2016005286A (en) * 2014-06-19 2016-01-12 エックスプライアント, インコーポレイテッド Method of forming hash input from packet contents, and apparatus thereof
KR20180087673A (en) * 2017-01-25 2018-08-02 한국전자통신연구원 Method and apparatus for flow processing acceleration

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116450656A (en) * 2023-06-16 2023-07-18 北京数巅科技有限公司 Data processing method, device, equipment and storage medium
CN116450656B (en) * 2023-06-16 2023-08-22 北京数巅科技有限公司 Data processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108260169B (en) QoS guarantee-based dynamic service function chain deployment method
US7684400B2 (en) Logarithmic time range-based multifield-correlation packet classification
US20070168377A1 (en) Method and apparatus for classifying Internet Protocol data packets
US8730965B2 (en) Systems and methods for dynamic routing in a multiprocessor network using local congestion sensing
US7668160B2 (en) Methods for performing packet classification
US8750144B1 (en) System and method for reducing required memory updates
Qiu et al. Fastrule: Efficient flow entry updates for tcam-based openflow switches
US11343187B2 (en) Quantitative exact match distance in network flows
US20140122791A1 (en) System and method for packet classification and internet protocol lookup in a network environment
CN106664251A (en) Bi-directional flow stickiness in a network environment
US11762826B2 (en) Search apparatus, search method, program and recording medium
CN107347035B (en) Route searching method and device, distribution node, searching node and entry node
JP3813136B2 (en) Communication control device, communication control method, communication control program, communication control data structure
CN101741705A (en) Method and device for parallel processing of routing update messages
CN104580202B (en) The matching process and device of message
EP3136662A1 (en) Construction method, device and system for multi-path forwarding rules
TWI593256B (en) Methods and systems for flexible packet classification
KR102050828B1 (en) Method for accelerating open virtual switch using parallel computation and open virtual switch using the same
US10469368B2 (en) Distributed routing table system with improved support for multiple network topologies
Schneider et al. Ensuring deadlock-freedom in low-diameter InfiniBand networks
Qiu et al. Fast lookup is not enough: Towards efficient and scalable flow entry updates for TCAM-based OpenFlow switches
Ren et al. On Scalable Service Function Chaining with $\mathcal {O}(1) $ Flowtable Entries
US11005884B2 (en) Denial of service mitigation with two-tier hash
US8595239B1 (en) Minimally disruptive hash table
CN112437065B (en) Strategy conflict detection and solution method based on graphic representation under SDN environment

Legal Events

Date Code Title Description
GRNT Written decision to grant