Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP6372103B2 - Switch device, data transfer control method, and data transfer control program - Google Patents
[go: Go Back, main page]

JP6372103B2 - Switch device, data transfer control method, and data transfer control program - Google Patents

Switch device, data transfer control method, and data transfer control program Download PDF

Info

Publication number
JP6372103B2
JP6372103B2 JP2014046569A JP2014046569A JP6372103B2 JP 6372103 B2 JP6372103 B2 JP 6372103B2 JP 2014046569 A JP2014046569 A JP 2014046569A JP 2014046569 A JP2014046569 A JP 2014046569A JP 6372103 B2 JP6372103 B2 JP 6372103B2
Authority
JP
Japan
Prior art keywords
communication data
transfer
transfer table
record
transfer destination
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
JP2014046569A
Other languages
Japanese (ja)
Other versions
JP2015171089A (en
Inventor
川上 勝也
勝也 川上
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP2014046569A priority Critical patent/JP6372103B2/en
Publication of JP2015171089A publication Critical patent/JP2015171089A/en
Application granted granted Critical
Publication of JP6372103B2 publication Critical patent/JP6372103B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Description

本発明は、スイッチ装置、データ転送制御方法、及びデータ転送制御プログラムに関し、特に、転送テーブルを検索することで通信データの転送先を決定する技術に関する。   The present invention relates to a switch device, a data transfer control method, and a data transfer control program, and more particularly to a technique for determining a transfer destination of communication data by searching a transfer table.

特許文献1には、ネットワーク帯域に見合った高速な検索性能を有するパターンマッチング処理を実現することを目的とした装置が開示されている。この装置は、マルチコアCPUにおいて、複数のプロセッサコアで共有される共有メモリにフローテーブルを保持している。この装置では、パケットが到着すると、ヘッダ情報を抽出し、その検索をマルチコアCPU内の特定のプロセッサコアに割り当てる。プロセッサコアは、パケットから抽出されたヘッダ情報(検索キー)からハッシュ値を計算し、そのハッシュ値によってフローテーブルからエントリを検索する。   Japanese Patent Application Laid-Open No. 2004-228561 discloses an apparatus for realizing a pattern matching process having a high-speed search performance corresponding to a network band. In this multi-core CPU, a flow table is held in a shared memory shared by a plurality of processor cores. In this device, when a packet arrives, header information is extracted and the search is assigned to a specific processor core in the multi-core CPU. The processor core calculates a hash value from header information (search key) extracted from the packet, and searches for an entry from the flow table using the hash value.

また、特許文献1では、他の態様として、M個のマルチコアCPUを含む装置が開示されている。この装置では、フローテーブルをM個に分割して、各マルチコアCPU内の共有メモリに保持するようにしている。   Patent Document 1 discloses an apparatus including M multi-core CPUs as another aspect. In this apparatus, the flow table is divided into M pieces and held in a shared memory in each multi-core CPU.

国際公開第2011/078108号International Publication No. 2011/078108

しかしながら、特許文献1には、フローテーブルの分割の仕方については全く開示がされていない。よって、特許文献1には、次に説明するような問題が発生することがある。以下、図を参照して、その問題点について説明する。なお、以下に説明する内容は、本願発明者が新たに検討した内容であって、従来技術を説明するものではない。   However, Patent Document 1 does not disclose any way of dividing the flow table. Therefore, the patent document 1 may have the following problem. Hereinafter, the problem will be described with reference to the drawings. In addition, the content demonstrated below is the content which this inventor newly examined, and does not demonstrate a prior art.

図11は、SIMD型アクセラレータデバイスにおいて同一のインストラクショングループに属する複数のSIMDコア301〜303によって、1つ以上のレコードが含まれる転送テーブルから、該当のレコードを検索する場合について示している。SIMDコア301〜303のそれぞれは、通信ポートA〜Cのそれぞれを介して受信したパケットについて、通信ポートごとに独立した転送テーブルから該当のレコードを検索するものとする。また、SIMDコア301〜303のそれぞれが参照する転送テーブルは、通信ポートごとにレコード数が異なるものとする。図11では、SIMDコアが参照する転送テーブルのサイズ(レコード数)が1であり、SIMDコアが参照する転送テーブルのサイズ(レコード数)が2であり、SIMDコアが参照する転送テーブルのサイズ(レコード数)が3である場合について示している。   FIG. 11 shows a case where a corresponding record is retrieved from a transfer table including one or more records by a plurality of SIMD cores 301 to 303 belonging to the same instruction group in the SIMD type accelerator device. Each of the SIMD cores 301 to 303 searches for a corresponding record from a transfer table independent for each communication port for a packet received via each of the communication ports A to C. In addition, the transfer table referred to by each of the SIMD cores 301 to 303 has a different number of records for each communication port. In FIG. 11, the size (number of records) of the transfer table referred to by the SIMD core is 1, the size of the transfer table (number of records) referred to by the SIMD core is 2, and the size of the transfer table referred to by the SIMD core ( The case where the number of records) is 3 is shown.

SIMD型アーキテクチャでは、同一のインストラクショングループに属する全てのSIMDコア301〜303は、同一命令を実行する必要があり、自身の処理が終了したとしても、他のSIMDコアの処理の終了を待たなければいけない。よって、図11に例示する場合には、検索処理のステップ数(参照する転送テーブルのレコード数)が多いSIMDコアは、検索処理のステップ数が少ないSIMDコアによって待たされることになる。   In the SIMD type architecture, all the SIMD cores 301 to 303 belonging to the same instruction group need to execute the same instruction, and even if their own processing is completed, it is necessary to wait for the completion of the processing of other SIMD cores. should not. Therefore, in the case illustrated in FIG. 11, the SIMD core having a large number of search processing steps (the number of transfer table records to be referred to) is waited by the SIMD core having a small number of search processing steps.

すなわち、図12に示すように、サイズ1の転送テーブルを参照するSIMDコア301は、1stepで検索処理が終了し、サイズ2の転送テーブルを参照するSIMD302コアは、2stepで検索処理が終了し、サイズ3の転送テーブルを参照するSIMDコア303は、3stepで検索処理が終了する。よって、サイズ1の転送テーブルを参照するSIMDコア301は、SIMDコア303によって2step待たされ、サイズ2の転送テーブルを参照するSIMDコア302は、SIMDコア303によって1step待たされてしまうことになる。   That is, as shown in FIG. 12, the SIMD core 301 that references the size 1 transfer table finishes the search process in 1 step, and the SIMD 302 core that references the size 2 transfer table finishes the search process in 2 steps. The SIMD core 303 that refers to the transfer table of size 3 finishes the search process in 3 steps. Therefore, the SIMD core 301 that refers to the size 1 transfer table waits 2 steps by the SIMD core 303, and the SIMD core 302 that refers to the size 2 transfer table waits 1 step by the SIMD core 303.

このように、複数のSIMDコアで分散して並列的に転送テーブルを検索する場合、元となる転送テーブルを考慮なしに分割し、SIMDコアのそれぞれに割り当ててしまうと、一部のSIMDコアが待たされてしまうという問題がある。すなわち、SIMDコア(プロセッサコア)の処理効率が低下してしまうという問題がある。   As described above, when a transfer table is searched in parallel by being distributed among a plurality of SIMD cores, if the original transfer table is divided without consideration and assigned to each of the SIMD cores, some SIMD cores There is a problem of waiting. That is, there is a problem that the processing efficiency of the SIMD core (processor core) decreases.

本発明の目的は、上述したような課題を解決するために、複数のプロセッサコアで分散して転送テーブルを検索する場合において、プロセッサコアの処理効率を向上することができるスイッチ装置、データ転送制御方法、及びデータ転送制御プログラムを提供することである。   In order to solve the above-described problems, an object of the present invention is to provide a switching device and data transfer control capable of improving the processing efficiency of a processor core when a transfer table is searched by being distributed among a plurality of processor cores. A method and a data transfer control program are provided.

本発明の第1の態様に係るスイッチ装置は、外部から受信した通信データの転送先を決定し、決定した転送先に前記通信データを転送するスイッチ装置であって、前記通信データから抽出される検索キーと、当該検索キーが抽出される通信データの転送先とを示す複数のレコードを含む転送テーブルが記憶される転送テーブル記憶部と、前記転送テーブルに含まれる複数のレコードのうち、自身に割り当てられたレコードを、前記通信データから抽出した検索キーで検索をすることで、当該通信データの転送先を決定する複数のプロセッサコアと、前記転送テーブルに含まれるレコードの数と、前記プロセッサコアの数とに基づいて、前記転送テーブルを分割して前記複数のプロセッサコアのそれぞれに前記レコードを平均的に割り当てる転送テーブル細分化部と、を備えたものである。   The switch device according to the first aspect of the present invention is a switch device that determines a transfer destination of communication data received from the outside and transfers the communication data to the determined transfer destination, and is extracted from the communication data A transfer table storage unit that stores a search key and a transfer table including a plurality of records indicating the transfer destination of communication data from which the search key is extracted, and among the plurality of records included in the transfer table, A plurality of processor cores that determine the transfer destination of the communication data by searching the assigned record using a search key extracted from the communication data, the number of records included in the transfer table, and the processor core The transfer table is divided and the records are allocated to each of the plurality of processor cores on an average basis. A table subdivision unit, those having a.

本発明の第2の態様に係るデータ転送制御方法は、受信した通信データの転送先を決定し、決定した転送先に前記通信データを転送するデータ転送制御方法であって、前記通信データから抽出される検索キーと、当該検索キーが抽出される通信データの転送先とを示す複数のレコードを含む転送テーブルを転送テーブル記憶部に記憶する記憶ステップと、前記転送テーブルに含まれる複数のレコードを、複数のプロセッサコアに割り当てる割当ステップと、前記複数のプロセッサコアが、前記転送テーブルに含まれる複数のレコードのうち、自身に割り当てられたレコードを、前記通信データから抽出した検索キーで検索をすることで、当該通信データの転送先を決定する検索ステップと、を備え、前記割当ステップでは、前記転送テーブルに含まれるレコードの数と、前記プロセッサコアの数とに基づいて、前記転送テーブルを分割して前記複数のプロセッサコアのそれぞれに前記レコードを平均的に割り当てるものである。   A data transfer control method according to a second aspect of the present invention is a data transfer control method for determining a transfer destination of received communication data and transferring the communication data to the determined transfer destination, which is extracted from the communication data Storing a transfer table including a plurality of records indicating a search key to be transmitted and a transfer destination of communication data from which the search key is extracted in a transfer table storage unit; and a plurality of records included in the transfer table. Allocating to a plurality of processor cores, and the plurality of processor cores search for a record allocated to itself among a plurality of records included in the transfer table with a search key extracted from the communication data. A search step for determining a transfer destination of the communication data, and in the assignment step, the transfer table The number of records included, based on the number of processor cores, in which average assigns the record to each of the plurality of processor cores by dividing the forwarding table.

本発明の第3の態様に係るデータ転送制御プログラムは、受信した通信データの転送先を決定し、決定した転送先に前記通信データを転送するためのデータ転送制御プログラムであって、前記通信データから抽出される検索キーと、当該検索キーが抽出される通信データの転送先とを示す複数のレコードを含む転送テーブルを転送テーブル記憶部に記憶する記憶処理と、前記転送テーブルに含まれる複数のレコードを、複数のプロセッサコアに割り当てる割当処理と、前記複数のプロセッサコアが、前記転送テーブルに含まれる複数のレコードのうち、自身に割り当てられたレコードを、前記通信データから抽出した検索キーで検索をすることで、当該通信データの転送先を決定する検索処理と、をコンピュータに実行させ、前記割当処理では、前記転送テーブルに含まれるレコードの数と、前記プロセッサコアの数とに基づいて、前記転送テーブルを分割して前記複数のプロセッサコアのそれぞれに前記レコードを平均的に割り当てるものである。   A data transfer control program according to a third aspect of the present invention is a data transfer control program for determining a transfer destination of received communication data and transferring the communication data to the determined transfer destination, wherein the communication data A storage process for storing a transfer table including a plurality of records indicating a search key extracted from the communication key and a transfer destination of communication data from which the search key is extracted, in a transfer table storage unit; and a plurality of processes included in the transfer table An allocation process for allocating records to a plurality of processor cores, and the plurality of processor cores search for a record allocated to itself among a plurality of records included in the transfer table with a search key extracted from the communication data By performing the search process for determining the transfer destination of the communication data, the computer executes the search process. , The number of records contained in the forwarding table, based on the number of the processor core, in which averagely assigning the record to each of the plurality of processor cores by dividing the forwarding table.

上述した本発明の各態様によれば、複数のプロセッサコアで分散して転送テーブルを検索する場合において、プロセッサコアの処理効率を向上することができるスイッチ装置、データ転送制御方法、及びデータ転送制御プログラムを提供することができる。   According to each aspect of the present invention described above, a switching device, a data transfer control method, and data transfer control that can improve the processing efficiency of a processor core when a transfer table is searched by being distributed among a plurality of processor cores. A program can be provided.

実施の形態に係るスイッチ装置の構成図である。It is a block diagram of the switch apparatus which concerns on embodiment. 実施の形態に係るスイッチ装置の機能ブロック図である。It is a functional block diagram of the switch apparatus concerning an embodiment. 実施の形態に係る通信データ入力装置の機能ブロック図である。It is a functional block diagram of the communication data input device concerning an embodiment. 実施の形態に係るデータ処理装置の機能ブロック図である。It is a functional block diagram of a data processing device concerning an embodiment. 実施の形態に係る転送テーブル分割部に記憶される転送テーブルの一例を示す図である。It is a figure which shows an example of the transfer table memorize | stored in the transfer table division part which concerns on embodiment. 実施の形態に係るデータ処理装置の機能ブロックとハードウェアとの関係を示す図である。It is a figure which shows the relationship between the functional block of the data processor which concerns on embodiment, and hardware. 実施の形態に係るスイッチ装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the switch apparatus which concerns on embodiment. 実施の形態に係る細分化転送テーブル記憶部の転送テーブルとSIMDコアとの関係の一例を示す図である。It is a figure which shows an example of the relationship between the transfer table of the fragmentation transfer table memory | storage part which concerns on embodiment, and a SIMD core. 実施の形態に係るスイッチ装置の処理状況の一例を示す図である。It is a figure which shows an example of the processing condition of the switch apparatus which concerns on embodiment. 実施の形態に係るスイッチ装置の概略構成図である。It is a schematic block diagram of the switch apparatus which concerns on embodiment. 発明者の検討内容における転送テーブルとSIMDコアとの関係の一例を示す図である。It is a figure which shows an example of the relationship between the transfer table in an inventor's examination content, and a SIMD core. 発明者の検討内容における処理状況の一例を示す図である。It is a figure which shows an example of the processing condition in the inventor's examination content.

<発明の実施の形態>
以下に図面を参照しながら、本発明の好適な実施の形態について説明する。以下の実施の形態に示す具体的な数値等は、発明の理解を容易とするための例示にすぎず、特に断る場合を除き、それに限定されるものではない。また、以下の記載及び図面では、説明の明確化のため、当業者にとって自明な事項等については、適宜、省略及び簡略化がなされている。
<Embodiment of the Invention>
Hereinafter, preferred embodiments of the present invention will be described with reference to the drawings. Specific numerical values and the like shown in the following embodiments are merely examples for facilitating understanding of the invention, and are not limited thereto unless otherwise specified. In the following description and drawings, matters obvious to those skilled in the art are omitted or simplified as appropriate for the sake of clarity.

図1を参照して、本発明の実施の形態に係るスイッチ装置100の構成について説明する。図1は、本発明の実施の形態に係るスイッチ装置100の構成図である。   With reference to FIG. 1, the structure of the switch apparatus 100 which concerns on embodiment of this invention is demonstrated. FIG. 1 is a configuration diagram of a switch device 100 according to an embodiment of the present invention.

スイッチ装置100は、CPU(Central Processing Unit)101、メインメモリ102、ビデオメモリ103、及びGPU(Graphics Processing Unit)104を有する。   The switch device 100 includes a CPU (Central Processing Unit) 101, a main memory 102, a video memory 103, and a GPU (Graphics Processing Unit) 104.

CPU101は、スイッチ装置100を統括的に制御する。CPU101は、メインメモリ102に記憶されたスイッチングソフトウェア(スイッチングプログラム)110を実行することで、ソフトウェアスイッチ(仮想スイッチ)としての機能をスイッチ装置100上で実現する。   The CPU 101 controls the switch device 100 in an integrated manner. The CPU 101 implements a function as a software switch (virtual switch) on the switch device 100 by executing switching software (switching program) 110 stored in the main memory 102.

メインメモリ102は、CPU101によって使用される各種情報、及び、CPU101の演算結果等が記憶される。また、メインメモリ102は、CPU101とGPU104との間の情報の受け渡しにも利用される。CPU101は、GPU104に受け渡す情報をメインメモリ102に記憶することで、メインメモリ102からビデオメモリ103に、その情報を転送する。この情報の転送は、例えば、DMA転送によって実施する。   The main memory 102 stores various information used by the CPU 101, calculation results of the CPU 101, and the like. The main memory 102 is also used for information exchange between the CPU 101 and the GPU 104. The CPU 101 stores information transferred to the GPU 104 in the main memory 102, thereby transferring the information from the main memory 102 to the video memory 103. This information transfer is performed by, for example, DMA transfer.

ビデオメモリ103は、GPU104によって使用される各種情報、及び、GPU104の演算結果等が記憶される。また、ビデオメモリ103は、CPU101とGPU104との間の情報の受け渡しにも利用される。GPU104は、CPU101に受け渡す情報をビデオメモリ103に記憶することで、ビデオメモリ103からメインメモリ102に、その情報を転送する。この情報の転送は、例えば、DMA転送によって実施する。   The video memory 103 stores various information used by the GPU 104, calculation results of the GPU 104, and the like. The video memory 103 is also used for information exchange between the CPU 101 and the GPU 104. The GPU 104 stores information to be transferred to the CPU 101 in the video memory 103, thereby transferring the information from the video memory 103 to the main memory 102. This information transfer is performed by, for example, DMA transfer.

GPU104は、CPU101からの命令に従って各種処理を実行する。GPU104は、SIMD型アーキテクチャで動作するSIMD型アクセラレータデバイスである。本実施の形態では、SIMD型アクセラレータデバイスとして、GPUを採用した例について説明するが、同様の処理を実行可能なSIMD型アクセラレータデバイスであれば、これに限られない。また、アクセラレータデバイスは、同様の処理を実行可能であれば、SIMD型であることには限定されない。   The GPU 104 executes various processes in accordance with instructions from the CPU 101. The GPU 104 is a SIMD type accelerator device that operates in a SIMD type architecture. In this embodiment, an example in which a GPU is used as a SIMD type accelerator device will be described. However, the present invention is not limited to this as long as it is a SIMD type accelerator device capable of executing the same processing. The accelerator device is not limited to the SIMD type as long as similar processing can be performed.

通信ポート201〜203は、上述のソフトウェアスイッチと接続される通信ポートに相当する。通信ポート201〜203は、通信データ(パケット)を送受信する。通信ポート201〜203は、通信データを受信してソフトウェアスイッチへ送信する入力ポート、及び、外部に対して送信する出力ポートとして機能する。なお、本実施の形態では、通信ポートの数が3つである場合について例示するが、その数はこの例に限られない。また、通信ポートは受信専用の通信ポート、および送信専用の通信ポートが存在してもよい。   The communication ports 201 to 203 correspond to communication ports connected to the above-described software switch. The communication ports 201 to 203 transmit and receive communication data (packets). The communication ports 201 to 203 function as an input port that receives communication data and transmits it to the software switch, and an output port that transmits the data to the outside. In the present embodiment, the case where the number of communication ports is three is illustrated, but the number is not limited to this example. The communication port may include a reception-only communication port and a transmission-only communication port.

上述した構成により、スイッチ装置100は、次のように動作する。CPU101は、通信ポート201〜203を介して通信データを受信した場合に、その通信データの転送先の決定をGPU104に指示する。GPU104は、CPU101からの指示に応じて、通信データから抽出した情報に基づいて、転送テーブルからその通信データの転送先を検索する。ここで、GPU104は、後述するように複数のSIMDコアを有しており、それら複数のSIMDコアによって並列的に検索を行う。GPU104は、検索した転送先をCPU101に通知する。CPU101は、GPU104から通知された転送先に、通信データを転送する。   With the above-described configuration, the switch device 100 operates as follows. When the CPU 101 receives communication data via the communication ports 201 to 203, the CPU 101 instructs the GPU 104 to determine the transfer destination of the communication data. In response to an instruction from the CPU 101, the GPU 104 searches for a transfer destination of the communication data from the transfer table based on information extracted from the communication data. Here, the GPU 104 has a plurality of SIMD cores as will be described later, and performs a search in parallel by the plurality of SIMD cores. The GPU 104 notifies the CPU 101 of the searched transfer destination. The CPU 101 transfers the communication data to the transfer destination notified from the GPU 104.

ここで、スイッチ装置100は、例えば、1つ以上の仮想マシンを構築可能なサーバである。そして、スイッチ装置100は、上述の装置101〜104によって、仮想マシン間を接続するソフトウェアスイッチを実現する。   Here, the switch device 100 is, for example, a server capable of constructing one or more virtual machines. And the switch apparatus 100 implement | achieves the software switch which connects between virtual machines with the above-mentioned apparatuses 101-104.

続いて、図2〜図6を参照して、本発明の実施の形態に係るスイッチ装置100の機能ブロックについて説明する。図2は、本発明の実施の形態に係るスイッチ装置100の機能ブロック図である。図3は、本発明の実施の形態に係る通信データ入力装置1の機能ブロック図である。図4は、本発明の実施の形態に係るデータ処理装置2の機能ブロック図である。図5は、本発明の実施の形態に係る転送テーブル分割部29に記憶される転送テーブルの一例を示す図である。図6は、本発明の実施の形態に係るデータ処理装置2の機能ブロックとハードウェアとの関係を示す図である   Then, with reference to FIGS. 2-6, the functional block of the switch apparatus 100 which concerns on embodiment of this invention is demonstrated. FIG. 2 is a functional block diagram of the switch device 100 according to the embodiment of the present invention. FIG. 3 is a functional block diagram of the communication data input device 1 according to the embodiment of the present invention. FIG. 4 is a functional block diagram of the data processing apparatus 2 according to the embodiment of the present invention. FIG. 5 is a diagram showing an example of a transfer table stored in the transfer table dividing unit 29 according to the embodiment of the present invention. FIG. 6 is a diagram showing a relationship between functional blocks and hardware of the data processing apparatus 2 according to the embodiment of the present invention.

図2に示すように、スイッチ装置100は、複数の通信データ入力装置1、データ処理装置2、複数の通信データ出力装置3を有する。   As illustrated in FIG. 2, the switch device 100 includes a plurality of communication data input devices 1, a data processing device 2, and a plurality of communication data output devices 3.

通信データ入力装置1の数は通信ポート201〜203のうち受信機能を持つ通信ポートと同数となる。また、通信データ出力装置3の数は同様に送信機能を持つ通信ポートと同数となる。通信ポート201〜203のすべてが送受信機能を持つ場合、通信データ入力装置1及び通信データ出力装置3のそれぞれの数と同じとなる。以下、3つの通信データ入力装置1を、それぞれ、通信データ入力装置1a、通信データ入力装置1b、通信データ入力装置1cとも呼ぶ。また、3つの通信データ出力装置3を、それぞれ、通信データ出力装置3a、3b、3cとも呼ぶ。   The number of communication data input devices 1 is the same as that of communication ports 201 to 203 having a reception function. Similarly, the number of communication data output devices 3 is the same as the number of communication ports having a transmission function. When all of the communication ports 201 to 203 have a transmission / reception function, the number of communication data input devices 1 and the number of communication data output devices 3 are the same. Hereinafter, the three communication data input devices 1 are also referred to as a communication data input device 1a, a communication data input device 1b, and a communication data input device 1c, respectively. The three communication data output devices 3 are also referred to as communication data output devices 3a, 3b, and 3c, respectively.

図3に示すように、通信データ入力装置1は、通信データ入力制御部11及びデータ転送部12を有する。以下、通信データ入力装置1a〜1cにおける通信データ入力制御部11のそれぞれを、通信データ入力制御部11a、11b、11cとも呼ぶ。また、通信データ入力装置1a〜1cにおけるデータ転送部12のそれぞれを、データ転送部12a、データ転送部12b、データ転送部12cとも呼ぶ。   As illustrated in FIG. 3, the communication data input device 1 includes a communication data input control unit 11 and a data transfer unit 12. Hereinafter, each of the communication data input control units 11 in the communication data input devices 1a to 1c is also referred to as communication data input control units 11a, 11b, and 11c. In addition, each of the data transfer units 12 in the communication data input devices 1a to 1c is also referred to as a data transfer unit 12a, a data transfer unit 12b, and a data transfer unit 12c.

通信データ入力制御部11は、スイッチ装置100で動作する仮想マシン上にエミュレーションされたNIC(Nework Interface Card)に相当する。通信データ入力制御部11は、仮想マシンからの通信データをデータ転送部12に送信する。なお、通信データ入力制御部11a〜11cは、全てが上述したような仮想NICであることに限られず、物理NICを含んでいてもよい。   The communication data input control unit 11 corresponds to a NIC (Nework Interface Card) emulated on a virtual machine operating on the switch device 100. The communication data input control unit 11 transmits communication data from the virtual machine to the data transfer unit 12. The communication data input control units 11a to 11c are not limited to virtual NICs as described above, and may include physical NICs.

データ転送部12は、通信データ入力制御部11から送信された通信データを受信し、データ処理装置2に送信する。データ転送部12a〜12cのそれぞれは、通信データ入力制御部11a〜11cのそれぞれに対応付けられており、対応する通信データ入力制御部11からの通信データを独立して受信する。また、データ転送部12a〜12cのそれぞれは、後述するデータ処理装置2が有する入力データ記憶部21a〜21cのそれぞれに対応付けられており、対応付する入力データ記憶部に受信した通信データを独立して転送する。データ転送部12a〜12cのそれぞれは、通信ポート201〜203に相当する。   The data transfer unit 12 receives the communication data transmitted from the communication data input control unit 11 and transmits it to the data processing device 2. Each of the data transfer units 12a to 12c is associated with each of the communication data input control units 11a to 11c, and receives the communication data from the corresponding communication data input control unit 11 independently. Further, each of the data transfer units 12a to 12c is associated with each of input data storage units 21a to 21c included in the data processing apparatus 2 described later, and the communication data received by the associated input data storage unit is independent. And transfer. Each of the data transfer units 12a to 12c corresponds to the communication ports 201 to 203.

図4に示すように、データ処理装置2は、複数の入力データ記憶部21、転送テーブル記憶部22、転送テーブル細分化部23、複数の細分化転送テーブル記憶部24、転送テーブル検索部25、複数のマッチ優先度判定部26、転送テーブル制御情報受信処理部27、複数のアクション実行部28、転送テーブル分割部29、複数の出力データ記憶部30を有している。   As shown in FIG. 4, the data processing device 2 includes a plurality of input data storage units 21, a transfer table storage unit 22, a transfer table subdivision unit 23, a plurality of subdivision transfer table storage units 24, a transfer table search unit 25, A plurality of match priority determination units 26, a transfer table control information reception processing unit 27, a plurality of action execution units 28, a transfer table division unit 29, and a plurality of output data storage units 30 are provided.

入力データ記憶部21、マッチ優先度判定部26、及びアクション実行部28はデータ転送部12の数と同じとなる。出力データ記憶部30は、通信データ出力装置3a〜3cの数と同じとなる。また、本実施の形態では、細分化転送テーブル記憶部24の数が6つである場合について説明する。以下、3つの入力データ記憶部21を、それぞれ、3つの入力データ記憶部21a、21b、21cとも呼ぶ。また、6つの細分化転送テーブル記憶部24を、それぞれ、細分化転送テーブル記憶部24a、24b、24c、24d、24e、24fとも呼ぶ。また、マッチ優先度判定部26を、それぞれ、マッチ優先度判定部26a、26b、26cとも呼ぶ。また、3つのアクション実行部28を、それぞれ、アクション実行部28a、28b、28cとも呼ぶ。また、3つの出力データ記憶部30を、それぞれ、出力データ記憶部30a、30b、30cとも呼ぶ。このように、入力データ記憶部21、マッチ優先度判定部26、及びアクション実行部28は通信データ入力制御部11に対応する数だけ用意される。通信データ記憶部30は、通信データ出力装置3に対応する数だけ用意される。また、細分化転送テーブル記憶部24の数は、後述するように、転送テーブル細分化部23で決定される使用するSIMDコアの数と同じとなる。   The number of input data storage units 21, match priority determination units 26, and action execution units 28 is the same as the number of data transfer units 12. The number of output data storage units 30 is the same as the number of communication data output devices 3a to 3c. In the present embodiment, a case where the number of subdivision transfer table storage units 24 is six will be described. Hereinafter, the three input data storage units 21 are also referred to as three input data storage units 21a, 21b, and 21c, respectively. The six subdivision transfer table storage units 24 are also referred to as subdivision transfer table storage units 24a, 24b, 24c, 24d, 24e, and 24f, respectively. The match priority determination unit 26 is also referred to as match priority determination units 26a, 26b, and 26c, respectively. The three action execution units 28 are also referred to as action execution units 28a, 28b, and 28c, respectively. The three output data storage units 30 are also referred to as output data storage units 30a, 30b, and 30c, respectively. As described above, the input data storage unit 21, the match priority determination unit 26, and the action execution unit 28 are prepared in a number corresponding to the communication data input control unit 11. The number of communication data storage units 30 corresponding to the number of communication data output devices 3 is prepared. The number of subdivision transfer table storage units 24 is the same as the number of SIMD cores to be used determined by the transfer table subdivision unit 23, as will be described later.

入力データ記憶部21は、データ転送部12から送信された通信データを受信し、記憶する。入力データ記憶部21a〜21cのそれぞれは、データ転送部12a〜12cのそれぞれと対応付けられており、対応するデータ転送部12から通信データを独立して受信する。   The input data storage unit 21 receives and stores the communication data transmitted from the data transfer unit 12. Each of the input data storage units 21a to 21c is associated with each of the data transfer units 12a to 12c, and receives communication data independently from the corresponding data transfer unit 12.

転送テーブル制御情報受信処理部27は、外部の装置から受信した転送テーブル制御情報を処理する。この転送テーブル制御情報は、外部から本ソフトウェアスイッチ宛てに送信された通信データとなる。本スイッチ装置100におけるソフトウェアスイッチをOpenFlowスイッチとして実現した場合、外部の装置は、OpenFlowコントローラに相当する。転送テーブル制御情報には、転送テーブルのレコードを追加、変更、又は削除することを指示する情報がある。転送テーブル制御情報は、レコードを追加又は変更することを指示する情報である場合、そのレコードを示す情報を含んでいる。転送テーブル制御情報受信処理部27は、受信した転送テーブル制御情報を転送テーブル記憶部22に転送する。   The transfer table control information reception processing unit 27 processes transfer table control information received from an external device. This transfer table control information is communication data transmitted from the outside to this software switch. When the software switch in the switch device 100 is realized as an OpenFlow switch, the external device corresponds to an OpenFlow controller. The transfer table control information includes information that instructs to add, change, or delete a record in the transfer table. When the transfer table control information is information that instructs to add or change a record, the transfer table control information includes information indicating the record. The transfer table control information reception processing unit 27 transfers the received transfer table control information to the transfer table storage unit 22.

転送テーブル記憶部22は、転送テーブルを予め記憶している。転送テーブル記憶部22は、転送テーブル制御情報受信処理部27から転送された転送テーブル制御情報に基づいて転送テーブルを更新する。転送テーブルにおけるレコードは、以下の(1)〜(3)の情報を含んでいる。
(1)優先度
(2)マッチ条件
(3)アクション
The transfer table storage unit 22 stores a transfer table in advance. The transfer table storage unit 22 updates the transfer table based on the transfer table control information transferred from the transfer table control information reception processing unit 27. The record in the transfer table includes the following information (1) to (3).
(1) Priority (2) Match condition (3) Action

優先度は、自身が含まれるレコード(アクション)の優先度を示す。優先度は、受信した通信データに対応するレコードを検索した際に複数のレコードがヒットしてしまった場合に、どちらのレコードを優先的に採用すべきかを決定するための比較に利用される。優先度は、比較可能な値であれば、どのような値を採用してもよい。例えば、優先度は、正の整数値で示すようにし、より大きい値の方が優先度は高いものとしてよい。また、本実施の形態では、転送テーブルに含まれる複数のレコードで同一の優先度が存在しないように、各レコードに優先度が設定されているものとする。   The priority indicates the priority of a record (action) including itself. The priority is used for comparison for determining which record should be preferentially adopted when a plurality of records are hit when a record corresponding to the received communication data is searched. As long as the priority is a comparable value, any value may be adopted. For example, the priority may be indicated by a positive integer value, and a higher value may have a higher priority. In the present embodiment, it is assumed that priorities are set for each record so that the same priority does not exist in a plurality of records included in the transfer table.

マッチ条件は、受信した通信データに対応するレコードを検索する際に、その通信データから抽出される検索条件(検索キー)との一致を比較される情報である。すなわち、検索では、受信した通信データから導き出された検索条件と一致するマッチ条件を含むレコードが、その通信データに対応するレコードとして抽出される。マッチ条件は、例えば、通信データが受信された入力ポート、通信データの宛先MACアドレス、通信データの送信元MACアドレス、通信データの宛先IPアドレス、及び通信データの送信元IPアドレス等を示す情報である。なお、マッチ条件は、ここで例示した情報のみに限られず、ここで例示した情報の一部のみとしてもよく、ここで例示した情報の少なくとも1つと他の情報とを含んでいてもよい。   The match condition is information that is compared with a search condition (search key) extracted from the communication data when searching for a record corresponding to the received communication data. That is, in the search, a record including a matching condition that matches the search condition derived from the received communication data is extracted as a record corresponding to the communication data. The match condition is, for example, information indicating an input port from which communication data is received, a destination MAC address of communication data, a source MAC address of communication data, a destination IP address of communication data, a source IP address of communication data, and the like. is there. Note that the match condition is not limited to the information exemplified here, but may be only a part of the information exemplified here, and may include at least one of the information exemplified here and other information.

アクションは、受信した通信データに対して実施する処理内容を示す情報である。アクションは、例えば、通信データに対する処理内容として、通信データを通信データ出力装置3(通信ポート)に出力、通信データを破棄、及び、通信データのフィールドを更新等の処理内容のうち、少なくとも1つを示している。通信データを通信データ出力装置3に出力、のアクションでは、通信データ出力装置3a〜3c(通信ポート201〜203)のうち、いずれを通信データの転送先(出力先)とするかも示される。   The action is information indicating the content of processing performed on the received communication data. The action is, for example, at least one of the processing contents such as outputting the communication data to the communication data output device 3 (communication port), discarding the communication data, and updating the field of the communication data as the processing contents for the communication data. Is shown. The action of outputting communication data to the communication data output device 3 also indicates which of the communication data output devices 3a to 3c (communication ports 201 to 203) is the transfer destination (output destination) of the communication data.

レコードは、例えば、具体的には以下のような内容が示される。   For example, the following contents are specifically shown in the record.

[優先度] 100
[マッチ条件] 入力ポート(通信ポート):通信データ入力装置1a、宛先アドレス:192.168.1.1、その他:何でもよい
[アクション] 通信データ出力装置3cに出力
[Priority] 100
[Match condition] Input port (communication port): communication data input device 1a, destination address: 192.168.1.1, others: anything
[Action] Output to communication data output device 3c

例えば、受信した通信データが、通信データ入力装置1a(通信ポート201)を介して受信されており、かつ、(例えばヘッダで)宛先アドレスとして「192.168.1.1」が示されている場合、その通信データに対応するレコードとして、上記の例のレコードがヒットする。   For example, when the received communication data is received via the communication data input device 1a (communication port 201) and “192.168.1.1” is indicated as the destination address (for example, in the header), the communication The record in the above example is hit as a record corresponding to the data.

このような転送テーブルを作成するものとして代表的なプロトコルにOpenFlowプロトコルが広く知られている。すなわち、本実施の形態においても、OpenFlowプロトコルを採用して、転送テーブルとしてフローテーブルを利用するようにしてもよいが、これに限定されるものではない。   The OpenFlow protocol is widely known as a representative protocol for creating such a transfer table. That is, in the present embodiment, the OpenFlow protocol may be adopted and the flow table may be used as the transfer table, but the present invention is not limited to this.

転送テーブル分割部29は、図5に例示するように、転送テーブル記憶部22に記憶される転送テーブルを取得し、マッチ条件の入力ポート(通信ポート)ごとに分割して記憶する。これにより、転送テーブルは、マッチ条件の入力ポートとして通信ポート201(通信データ入力装置1a)を示す転送テーブル291と、マッチ条件の入力ポートとして通信ポート202(通信データ入力装置1b)を示す転送テーブル292と、マッチ条件の入力ポートとして通信ポート203(通信データ入力装置1c)を示す転送テーブル293とに分割される。   As illustrated in FIG. 5, the transfer table dividing unit 29 acquires the transfer table stored in the transfer table storage unit 22, and stores the transfer table divided for each input port (communication port) of the match condition. Thereby, the transfer table shows the transfer table 291 indicating the communication port 201 (communication data input device 1a) as the input port of the match condition, and the transfer table indicating the communication port 202 (communication data input device 1b) as the input port of the match condition. 292 and a transfer table 293 indicating the communication port 203 (communication data input device 1c) as an input port of the match condition.

転送テーブル細分化部23は、転送テーブル分割部29に記憶された転送テーブルのレコード数とSIMDコア数とを比較し、各SIMDコアに割り当てるレコードを決定する。転送テーブル細分化部23は、決定した割り当てに従って、転送テーブル分割部29によって分割された転送テーブルをさらに細分化し、細分化転送テーブル記憶部24a〜24fのそれぞれに記憶する。また、転送テーブル細分化部23は、各SIMDコアに対応する細分化転送テーブル記憶部24及び入力データ記憶部21を示すSIMDコア割り当て情報を転送テーブル検索部25に通知する。   The transfer table subdivision unit 23 compares the number of records in the transfer table stored in the transfer table division unit 29 with the number of SIMD cores, and determines a record to be assigned to each SIMD core. The transfer table subdivision unit 23 further subdivides the transfer table divided by the transfer table division unit 29 in accordance with the determined assignment, and stores it in each of the subdivision transfer table storage units 24a to 24f. The transfer table subdivision unit 23 notifies the transfer table search unit 25 of SIMD core allocation information indicating the subdivision transfer table storage unit 24 and the input data storage unit 21 corresponding to each SIMD core.

ここで、転送テーブル細分化部23は、SIMDコアが処理するレコード数がおおよそ同じ数となるように平均化して各転送テーブル(転送テーブル分割部29によって分割された各転送テーブル)を細分化する。これは、各SIMDコアに割り当てられるレコード数が、同じ数により近づくように決定されるのであれば、任意の方法を採用するようにしてよい。例えば、最初に転送テーブル291〜293のそれぞれにSIMDコアを1つ割り当て、転送テーブル291〜293のそれぞれについて、割り当てられたSIMDコアでレコード数を割り算した結果が最も多いものに順次SIMDコアを追加していく処理を、割り当て可能なSIMDコアが無くなるまで繰り返す方法などによって決定してもよい。   Here, the transfer table subdivision unit 23 subdivides each transfer table (each transfer table divided by the transfer table division unit 29) by averaging so that the number of records processed by the SIMD core is approximately the same. . As long as the number of records allocated to each SIMD core is determined to be closer to the same number, an arbitrary method may be adopted. For example, first, one SIMD core is assigned to each of the transfer tables 291 to 293, and SIMD cores are sequentially added to the transfer tables 291 to 293 in which the result of dividing the number of records by the assigned SIMD core is the largest. The processing to be performed may be determined by a method of repeating until there are no assignable SIMD cores.

また、SIMDコア割り当て情報では、転送テーブル291を分割した転送テーブルが割り当てられるSIMDコアには、入力データ記憶部21aが割り当てられ、転送テーブル292を分割した転送テーブルが割り当てられるSIMDコアには、入力データ記憶部21bが割り当てられ、転送テーブル291を分割した転送テーブルが割り当てられるSIMDコアには、入力データ記憶部21cが割り当てられることになる。   In the SIMD core assignment information, the input data storage unit 21a is assigned to the SIMD core to which the transfer table obtained by dividing the transfer table 291 is assigned, and the input to the SIMD core to which the transfer table obtained by dividing the transfer table 292 is assigned. The input data storage unit 21c is allocated to the SIMD core to which the data storage unit 21b is allocated and the transfer table obtained by dividing the transfer table 291 is allocated.

図6に示すように、転送テーブル検索部25は、複数のSIMDコア31を有している。この複数のSIMDコア31は、上述したようにGPU104が有するものである。また、上述したように、転送テーブル検索部25が使用する複数のSIMDコア31a〜31fの数は、細分化転送テーブル記憶部24a〜24fの数と同じとなる。   As shown in FIG. 6, the transfer table search unit 25 has a plurality of SIMD cores 31. The plurality of SIMD cores 31 are included in the GPU 104 as described above. As described above, the number of the plurality of SIMD cores 31a to 31f used by the transfer table search unit 25 is the same as the number of the subdivision transfer table storage units 24a to 24f.

ここで、本実施の形態では、転送テーブル細分化部23において転送テーブルのレコード数とSIMDコア数とに基づいて転送テーブル291〜293が処理された結果、通信ポート201に対応する転送テーブル291は分割されずに細分化転送テーブル記憶部24aに記憶され、通信ポート202に対応する転送テーブル292は2つに分割されて細分化転送テーブル記憶部24b、24cにそれぞれ記憶されて、通信ポート203に対応する転送テーブル293は3つに分割されて細分化転送テーブル記憶部24d〜24fにそれぞれ記憶されたものとして場合について説明する。   Here, in this embodiment, as a result of processing the transfer tables 291 to 293 based on the number of records in the transfer table and the number of SIMD cores in the transfer table subdivision unit 23, the transfer table 291 corresponding to the communication port 201 is The transfer table 292 corresponding to the communication port 202 is stored in the subdivision transfer table storage units 24b and 24c and stored in the subdivision transfer table storage units 24b and 24c. The case where the corresponding transfer table 293 is divided into three and stored in the subdivision transfer table storage units 24d to 24f will be described.

この場合、転送テーブル細分化部23は、細分化転送テーブル記憶部24aがSIMDコア31a及び入力データ記憶部21aに対応し、細分化転送テーブル記憶部24b、24cのそれぞれがSIMDコア31b、cのそれぞれ及び入力データ記憶部21bに対応し、細分化転送テーブル記憶部24d〜24fのそれぞれがSIMDコア31a〜24fのそれぞれ及び入力データ記憶部21cに対応することを示すSIMDコア割り当て情報を生成し、転送テーブル検索部25に出力する。   In this case, in the transfer table subdivision unit 23, the subdivision transfer table storage unit 24a corresponds to the SIMD core 31a and the input data storage unit 21a, and each of the subdivision transfer table storage units 24b and 24c corresponds to the SIMD cores 31b and c. Respectively, corresponding to the input data storage unit 21b, generating SIMD core allocation information indicating that each of the subdivision transfer table storage units 24d to 24f corresponds to each of the SIMD cores 31a to 24f and the input data storage unit 21c, The data is output to the transfer table search unit 25.

なお、図6にも示すように、細分化転送テーブル記憶部24、転送テーブル検索部25、マッチ優先度判定部26は、SIMD型アーキテクチャ(ビデオメモリ103、GPU104等)で実現される。また、その他(入力データ記憶部21、転送テーブル記憶部22、転送テーブル細分化部23、転送テーブル制御情報受信処理部27、アクション実行部28、転送テーブル分割部29、及び出力データ記憶部30等)は、CPU101及びメインメモリ102等で実現される。   As shown in FIG. 6, the segmented transfer table storage unit 24, the transfer table search unit 25, and the match priority determination unit 26 are realized by a SIMD type architecture (video memory 103, GPU 104, etc.). Others (input data storage unit 21, transfer table storage unit 22, transfer table segmentation unit 23, transfer table control information reception processing unit 27, action execution unit 28, transfer table division unit 29, output data storage unit 30, etc. ) Is realized by the CPU 101, the main memory 102, and the like.

転送テーブル検索部25は、転送テーブル細分化部23から出力されたSIMDコア割り当て情報に従って、入力データ記憶部21に記憶された通信データと、細分化転送テーブル記憶部24に記憶されたレコードのマッチ条件とを比較して検索をする。   The transfer table search unit 25 matches the communication data stored in the input data storage unit 21 with the record stored in the subdivision transfer table storage unit 24 according to the SIMD core allocation information output from the transfer table subdivision unit 23. Search by comparing the conditions.

すなわち、SIMDコア31aは、自身に対応する細分化転送テーブル記憶部24aに記憶された転送テーブルを検索し、SIMDコア31bは、自身に対応する細分化転送テーブル記憶部24bに記憶された転送テーブルを検索し、SIMDコア31cは、自身に対応する細分化転送テーブル記憶部24cに記憶された転送テーブルを検索し、SIMDコア31dは、自身に対応する細分化転送テーブル記憶部24dに記憶された転送テーブルを検索し、SIMDコア31eは、自身に対応する細分化転送テーブル記憶部24eに記憶された転送テーブルを検索し、SIMDコア31fは、自身に対応する細分化転送テーブル記憶部24fに記憶された転送テーブルを検索する。また、SIMDコア31aは、自身に対応する入力データ記憶部21aに記憶された通信データを取得して、その通信データについて検索をし、SIMDコア31b、31cは、自身に対応する入力データ記憶部21bに記憶された通信データを取得して、その通信データについて検索をし、SIMDコア31d〜31fは、自身に対応する入力データ記憶部21cに記憶された通信データを取得して、その通信データについて検索をする。   That is, the SIMD core 31a searches the transfer table stored in the subdivision transfer table storage unit 24a corresponding to itself, and the SIMD core 31b transfers the transfer table stored in the subdivision transfer table storage unit 24b corresponding to itself. The SIMD core 31c searches the transfer table stored in the segmented transfer table storage unit 24c corresponding to itself, and the SIMD core 31d is stored in the segmented transfer table storage unit 24d corresponding to itself. The transfer table is searched, the SIMD core 31e searches for the transfer table stored in the subdivision transfer table storage unit 24e corresponding to itself, and the SIMD core 31f stores it in the subdivision transfer table storage unit 24f corresponding to itself. Search the forwarded transfer table. Further, the SIMD core 31a acquires the communication data stored in the input data storage unit 21a corresponding to itself, and searches for the communication data. The SIMD cores 31b and 31c are input data storage units corresponding to themselves. The communication data stored in 21b is acquired and the communication data is searched, and the SIMD cores 31d to 31f acquire the communication data stored in the input data storage unit 21c corresponding to the communication data, and the communication data Search for.

よって、この例では、SIMDコア31aが含まれるインストラクショングループと、SIMDコア31b、31cが含まれるインストラクショングループと、SIMDコア31d〜31fが含まれるインストラクショングループとが存在することになる。すなわち、転送テーブル検索部25は、SIMDコア割り当て情報に基づいて、SIMDコア31a〜31fを異なるインストラクショングループに分ける。   Therefore, in this example, there are an instruction group including the SIMD core 31a, an instruction group including the SIMD cores 31b and 31c, and an instruction group including the SIMD cores 31d to 31f. That is, the transfer table search unit 25 divides the SIMD cores 31a to 31f into different instruction groups based on the SIMD core assignment information.

また、転送テーブル検索部25は、マッチ条件にヒットしたレコードが無い場合に使用するダミーのレコードを記憶している。転送テーブル検索部25は、マッチ条件にヒットするレコードを検出した場合、そのヒットしたレコードと通信データをマッチ優先度判定部26に出力する。転送テーブル検索部25は、マッチ条件にヒットするレコードを検出できなかった場合、ダミーのレコードをマッチ優先度判定部26に出力する。このレコードは、例えば、優先度が最低、アクションとして、通信データを破棄、を示すようにすればよい。   Further, the transfer table search unit 25 stores a dummy record used when there is no record hit in the match condition. When the transfer table search unit 25 detects a record that hits the match condition, the transfer table search unit 25 outputs the hit record and communication data to the match priority determination unit 26. The transfer table search unit 25 outputs a dummy record to the match priority determination unit 26 when a record hitting the match condition cannot be detected. For example, this record may indicate that the priority is the lowest and the communication data is discarded as an action.

ここで、入力データ記憶部21a〜21cのそれぞれは、マッチ優先度判定部26a〜26cのそれぞれに対応する。よって、入力データ記憶部21aに対応するSIMDコア31aは、検索結果(レコード及び通信データ)をマッチ優先度判定部26aに出力し、入力データ記憶部21bに対応するSIMDコア31b、31cは、検索結果(レコード及び通信データ)をマッチ優先度判定部26bに出力し、入力データ記憶部21cに対応するSIMDコア31d〜31fは、検索結果(レコード及び通信データ)をマッチ優先度判定部26cに出力する。   Here, each of the input data storage units 21a to 21c corresponds to each of the match priority determination units 26a to 26c. Therefore, the SIMD core 31a corresponding to the input data storage unit 21a outputs the search result (record and communication data) to the match priority determination unit 26a, and the SIMD cores 31b and 31c corresponding to the input data storage unit 21b The result (record and communication data) is output to the match priority determination unit 26b, and the SIMD cores 31d to 31f corresponding to the input data storage unit 21c output the search result (record and communication data) to the match priority determination unit 26c. To do.

マッチ優先度判定部26は、転送テーブル検索部25からレコードと通信データの出力を受ける。マッチ優先度判定部26は、複数のSIMDコアからレコードと通信データの出力を受けた場合、それらのレコードの優先度を比較し、最も高い優先度をもつレコードのアクションを選択する。また、マッチ優先度判定部26は、選択したアクションを示すアクション情報と通信データをアクション実行部28に出力する。マッチ優先度判定部26a〜26cのそれぞれは、アクション実行部28a〜28cのそれぞれに対応し、対応するアクション実行部28にアクション情報と通信データを出力する。   The match priority determination unit 26 receives the record and communication data output from the transfer table search unit 25. When the match priority determination unit 26 receives records and communication data output from a plurality of SIMD cores, the match priority determination unit 26 compares the priorities of the records and selects the action of the record having the highest priority. Further, the match priority determination unit 26 outputs action information indicating the selected action and communication data to the action execution unit 28. Each of the match priority determination units 26a to 26c corresponds to each of the action execution units 28a to 28c, and outputs action information and communication data to the corresponding action execution unit 28.

ここで、マッチ優先度判定部26として、自身が処理対象とする検索結果を生成するインストラクショングループに属するSIMDコアを割り当てるようにしてもよく、それとは異なるインストラクショングループに属するSIMDコアを割り当てるようにしてもよい。マッチ優先度判定部26cを例に挙げて説明する。例えば、マッチ優先度判定部26cは、マッチ優先度判定部26cが処理対象とする検索結果を生成するインストラクショングループに属するSIMDコア31d〜31fのうち、少なくとも1つのSIMDコアを割り当てるようにしてもよい。また、マッチ優先度判定部26cは、マッチ優先度判定部26cが処理対象とする検索結果を生成するインストラクショングループとは異なるインストラクショングループに属する、図示しないSIMDコアを割り当てるようにしてもよい。   Here, as the match priority determination unit 26, an SIMD core belonging to an instruction group that generates a search result to be processed by itself may be assigned, or an SIMD core belonging to an instruction group different from that may be assigned. Also good. The match priority determination unit 26c will be described as an example. For example, the match priority determination unit 26c may allocate at least one SIMD core among the SIMD cores 31d to 31f that belong to the instruction group that generates the search result to be processed by the match priority determination unit 26c. . In addition, the match priority determination unit 26c may assign a SIMD core (not shown) that belongs to an instruction group different from the instruction group that generates a search result to be processed by the match priority determination unit 26c.

アクション実行部28は、マッチ優先度判定部26から出力された通信データに対して、マッチ優先度判定部26から出力されたアクション情報が示すアクションの処理をする。例えば、アクションとして、通信データを通信データ出力装置3(通信ポート)に出力、が示されている場合、出力データ記憶部30a〜30cのうち、そのアクションに対応する出力データ記憶部30に通信データを記憶する。   The action execution unit 28 processes the action indicated by the action information output from the match priority determination unit 26 for the communication data output from the match priority determination unit 26. For example, when communication data is output to the communication data output device 3 (communication port) as an action, communication data is output to the output data storage unit 30 corresponding to the action among the output data storage units 30a to 30c. Remember.

出力データ記憶部30は、アクション実行部28によって記憶された通信データを、自身に対応する通信データ出力装置3に出力する。出力データ記憶部30aは、通信データ出力装置3aに対応し、出力データ記憶部30bは、通信データ出力装置3bに対応し、出力データ記憶部30cは、通信データ出力装置3cに対応する。   The output data storage unit 30 outputs the communication data stored by the action execution unit 28 to the communication data output device 3 corresponding to itself. The output data storage unit 30a corresponds to the communication data output device 3a, the output data storage unit 30b corresponds to the communication data output device 3b, and the output data storage unit 30c corresponds to the communication data output device 3c.

すなわち、出力データ記憶部30として機能するCPU101は、同じく出力データ記憶部30として機能するメモリ102に記憶された通信データを、その出力データ記憶部30に対応する通信データ出力装置3に出力する。   That is, the CPU 101 that functions as the output data storage unit 30 outputs the communication data stored in the memory 102 that also functions as the output data storage unit 30 to the communication data output device 3 corresponding to the output data storage unit 30.

よって、アクション実行部28は、通信データを通信データ出力装置3(通信ポート)に出力、のアクションにおける転送先として、通信データ出力装置3aが示されている場合は通信データを出力データ記憶部30aに記憶し、通信データ出力装置3bが示されている場合は通信データを出力データ記憶部30bに記憶し、通信データ出力装置3cが示されている場合は通信データを出力データ記憶部30cに記憶する。   Therefore, the action execution unit 28 outputs the communication data to the output data storage unit 30a when the communication data output device 3a is indicated as the transfer destination in the action of outputting the communication data to the communication data output device 3 (communication port). When the communication data output device 3b is shown, the communication data is stored in the output data storage unit 30b. When the communication data output device 3c is shown, the communication data is stored in the output data storage unit 30c. To do.

通信データ出力装置3は、通信データ入力装置1と同様に、仮想マシン上にエミュレーションされたNIC及び通信ポートに相当する。通信データ出力装置3aは、通信データ入力装置1aのNIC及び通信ポート201に相当し、通信データ出力装置3bは、通信データ入力装置1bのNIC及び通信ポート202に相当し、通信データ出力装置3cは、通信データ入力装置1cのNIC及び通信ポート203に相当する。前述の通り本実施例では、通信ポート201〜203は送受信機能を持つため、通信データ出力装置3の数は通信データ入力装置1の数と同数となっているが、送信機能のみを持つ通信ポートも存在してもよく。同数とは限らない。通信データ入力装置1についても同様に、通信データ入力装置1の場合は受信機能のみを持つ通信ポートが存在してもよい。   Similar to the communication data input device 1, the communication data output device 3 corresponds to a NIC and a communication port emulated on a virtual machine. The communication data output device 3a corresponds to the NIC and communication port 201 of the communication data input device 1a, the communication data output device 3b corresponds to the NIC and communication port 202 of the communication data input device 1b, and the communication data output device 3c This corresponds to the NIC and communication port 203 of the communication data input device 1c. As described above, in this embodiment, since the communication ports 201 to 203 have the transmission / reception function, the number of the communication data output devices 3 is the same as the number of the communication data input devices 1, but the communication ports only have the transmission function. May also exist. The number is not necessarily the same. Similarly, for the communication data input device 1, in the case of the communication data input device 1, a communication port having only a reception function may exist.

すなわち、各入力ポート(通信ポート201〜203)から受信した通信データの転送先をデータ処理装置2によって検索し、検索結果に応じた転送先となる通信データ出力装置3(通信ポート201〜203のいずれか)に転送することで、通信データを所望の転送先(例えば仮想マシン)に転送することができる。   That is, the transfer destination of the communication data received from each input port (communication ports 201 to 203) is searched by the data processing device 2, and the communication data output device 3 (the communication port 201 to 203 of the communication ports 201 to 203) serving as the transfer destination according to the search result. By transferring to any one of them, the communication data can be transferred to a desired transfer destination (for example, a virtual machine).

以上に説明したように、本実施の形態では、通信ポート201〜203(データ転送部12a〜12c)のそれぞれによって受信された通信データは、通信ポート201〜203のそれぞれに対応する、入力データ記憶部21a〜21c、SIMDコア31a〜31f(SIMDコア31は、SIMDコア31aと、SIMDコア31b、31cと、SIMDコア31d〜31fのそれぞれとなる)、マッチ優先度判定部26a〜26c、アクション実行部28a〜28c、及び出力データ記憶部30a〜30cのそれぞれを経由して独立的に処理をすること可能である。そのため、複数の通信ポート201〜203から受信した通信データを1本にシリアライズせずに処理をすることが可能である。   As described above, in this embodiment, the communication data received by each of the communication ports 201 to 203 (data transfer units 12a to 12c) is input data storage corresponding to each of the communication ports 201 to 203. Units 21a to 21c, SIMD cores 31a to 31f (the SIMD core 31 is the SIMD core 31a, the SIMD cores 31b and 31c, and the SIMD cores 31d to 31f), the match priority determination units 26a to 26c, and the action execution It is possible to perform processing independently via each of the units 28a to 28c and the output data storage units 30a to 30c. Therefore, it is possible to process the communication data received from the plurality of communication ports 201 to 203 without serializing it into one.

また、このように、通信ポートで独立性を保っているため、ある通信ポートが高負荷となったとしても、他の通信ポートで受信される通信データまでもが滞留してしまうといったことが無くなる。   In addition, since the communication port maintains independence in this way, even if a certain communication port is heavily loaded, there is no possibility that even communication data received by another communication port will stay. .

続いて、図7を参照して、本発明の実施の形態に係るスイッチ装置100の動作について説明する。図7は、本発明の実施の形態に係るスイッチ装置の動作を示すフローチャートである。   Subsequently, the operation of the switch device 100 according to the embodiment of the present invention will be described with reference to FIG. FIG. 7 is a flowchart showing the operation of the switch device according to the embodiment of the present invention.

スイッチ装置100は、通信データを処理する前に、以下の動作を予め行う。   The switch device 100 performs the following operations in advance before processing communication data.

(1)データ転送部12のそれぞれは、自身に対応する入力データ記憶部21の位置を記憶する。すなわち、上述の例では、データ転送部12aは、入力データ記憶部21aを通信データの転送先として記憶し、入力データ記憶部21bを通信データの転送先として記憶し、入力データ記憶部21bを通信データの転送先として記憶する。 (1) Each of the data transfer units 12 stores the position of the input data storage unit 21 corresponding to itself. That is, in the above example, the data transfer unit 12a stores the input data storage unit 21a as a communication data transfer destination, stores the input data storage unit 21b as a communication data transfer destination, and communicates the input data storage unit 21b with the communication data. Store as data transfer destination.

(2)転送テーブル制御情報受信処理部27は、外部から転送テーブル制御情報を受信し、優先度、マッチ条件、及びアクションを含む転送テーブルのレコードを作成し、転送テーブル記憶部22に記憶する。 (2) The transfer table control information reception processing unit 27 receives transfer table control information from the outside, creates a transfer table record including priority, match condition, and action, and stores it in the transfer table storage unit 22.

(3)転送テーブル分割部29は、転送テーブル記憶部22からレコードを受け取り、マッチ条件にある入力ポートが同一となるテーブル群ごとに転送テーブルを分ける。すなわち、図5に示すように転送テーブルを分割する。 (3) The transfer table dividing unit 29 receives a record from the transfer table storage unit 22 and divides the transfer table for each table group having the same input port in the match condition. That is, the transfer table is divided as shown in FIG.

(4)転送テーブル細分化部23は、転送テーブル分割部29よって作成された入力ポートごとの転送テーブルを読み込み、レコードの数とSIMDコアの数を比較して、各SIMDコアが処理するレコード数が平均化されるように転送テーブルをさらに分割する。転送テーブル細分化部23は、それと同時に、細分化された転送テーブルのそれぞれの処理を担当するSIMDコアの割り当てを決定する。転送テーブル細分化部23は、細分化した転送テーブルを、その転送テーブルの処理を担当するSIMDコアに対応する細分化転送テーブル記憶部24に記憶する。また、転送テーブル細分化部23は、それと同時に、転送テーブル検索部25にSIMDコア割り当て情報を通知する。 (4) The transfer table subdivision unit 23 reads the transfer table for each input port created by the transfer table division unit 29, compares the number of records with the number of SIMD cores, and records the number of records processed by each SIMD core. Further subdivide the forwarding table so that. At the same time, the transfer table fragmentation unit 23 determines the assignment of SIMD cores that are responsible for the respective processes of the fragmented transfer table. The transfer table subdivision unit 23 stores the subdivided transfer table in the subdivision transfer table storage unit 24 corresponding to the SIMD core in charge of processing of the transfer table. At the same time, the transfer table subdivision unit 23 notifies the transfer table search unit 25 of SIMD core allocation information.

図8に示す例で説明すると、転送テーブルA(291)、B(292)、C(293)のレコード総数は6であり、SIMDコア数も6である。よって、各SIMDコアが担当するレコード数を平均化すると1コアに対し1レコードを担当させることで平均化することができる。この場合、転送テーブル細分化部23は、各1レコードの情報を細分化転送テーブル記憶部24a〜24fのそれぞれに記憶するとともに、それに応じたSIMDコア割り当て情報を転送テーブル検索部25に通知する。   In the example shown in FIG. 8, the total number of records in the transfer tables A (291), B (292), and C (293) is 6, and the number of SIMD cores is 6. Therefore, if the number of records handled by each SIMD core is averaged, it can be averaged by assigning one record to one core. In this case, the transfer table subdivision unit 23 stores the information of each record in each of the subdivision transfer table storage units 24a to 24f, and notifies the transfer table search unit 25 of the SIMD core allocation information corresponding thereto.

これによれば、図9に例示するように、転送テーブル検索部25における検索において、各SIMDコア31a〜31fにおける検索処理を1stepで終了させることができる。すなわち、各SIMDコア31a〜31fにおける処理時間を平均化されるため、各SIMDコア31a〜31fの待機時間を無くすことができ、各SIMDコア31a〜31fの処理効率を向上することができる。   According to this, as illustrated in FIG. 9, in the search in the transfer table search unit 25, the search processing in each of the SIMD cores 31a to 31f can be completed in one step. That is, since the processing time in each SIMD core 31a-31f is averaged, the waiting time of each SIMD core 31a-31f can be eliminated, and the processing efficiency of each SIMD core 31a-31f can be improved.

すなわち、この場合におけるSIMDコア割り当て情報は、細分化転送テーブル記憶部24aの転送レコードをSIMDコア31aが担当することを示し、細分化転送テーブル記憶部24bの転送レコードをSIMDコア31bが担当することを示し、細分化転送テーブル記憶部24cの転送レコードをSIMDコア31cが担当することを示し、細分化転送テーブル記憶部24eの転送レコードをSIMDコア31eが担当することを示し、細分化転送テーブル記憶部24fの転送レコードをSIMDコア31fが担当することを示し、細分化転送テーブル記憶部24gの転送レコードをSIMDコア31gが担当することを示す。   That is, the SIMD core allocation information in this case indicates that the SIMD core 31a is in charge of the transfer record of the subdivision transfer table storage unit 24a, and the SIMD core 31b is in charge of the transfer record of the subdivision transfer table storage unit 24b. , Indicates that the SIMD core 31c is responsible for the transfer record of the subdivision transfer table storage unit 24c, indicates that the SIMD core 31e is in charge of the transfer record of the subdivision transfer table storage unit 24e, and stores the subdivision transfer table storage The SIMD core 31f is in charge of the transfer record of the unit 24f, and the SIMD core 31g is in charge of the transfer record of the subdivision transfer table storage unit 24g.

以下、通信データの処理について説明する。   Hereinafter, processing of communication data will be described.

(1)通信データ入力制御部11は、通信データをデータ転送部12に送信する。なお、上述したように、通信データ入力制御部11は、仮想マシン上のNICに相当するが、このデータ転送部12に通信データを送信する動作を除いて、他の動作は一般的な仮想マシン上のNICと同様の動作としてよい。これにより、データ転送部12は、通信データを受信する(S1)。 (1) The communication data input control unit 11 transmits communication data to the data transfer unit 12. As described above, the communication data input control unit 11 corresponds to a NIC on a virtual machine, but other operations than the operation of transmitting communication data to the data transfer unit 12 are general virtual machines. The operation may be the same as that of the above NIC. Thereby, the data transfer part 12 receives communication data (S1).

(2)データ転送部12は、受信した通信データを、自身に対応する入力データ記憶部21に記憶する(S2)。上述したように、データ転送部12a〜12cのそれぞれは、相互に独立して通信データを処理する。 (2) The data transfer unit 12 stores the received communication data in the input data storage unit 21 corresponding to itself (S2). As described above, each of the data transfer units 12a to 12c processes communication data independently of each other.

(3)転送テーブル検索部25は、転送テーブル細分化部23から通知されたSIMDコア割り当て情報に基づいて、入力データ記憶部21から通信データを読み込み、その通信データから抽出した検索キーと、細分化転送テーブル記憶部24に記憶された転送テーブルの各レコードのマッチ条件とを比較し、マッチしたレコードの内で最も優先度の高いレコードを検索する。転送テーブル検索部25は、検索したレコードと通信データをマッチ優先度判定部26に送信する(S3)。なお、転送テーブル検索部25は、マッチしたレコードが検出されなかった場合は、優先度を最低、アクションを転送テーブルの全てのレコードのマッチ条件にマッチしなかった場合の処理(例えば通信データの破棄)、としたダミーのレコードと通信データをマッチ優先度判定部26に送信する。 (3) The transfer table search unit 25 reads the communication data from the input data storage unit 21 based on the SIMD core assignment information notified from the transfer table subdivision unit 23, the search key extracted from the communication data, and the subdivision The matching condition of each record in the transfer table stored in the generalized transfer table storage unit 24 is compared, and the record with the highest priority is searched for among the matched records. The transfer table search unit 25 transmits the searched record and communication data to the match priority determination unit 26 (S3). If no matching record is detected, the forwarding table search unit 25 performs processing when the priority is the lowest and the action does not match the matching conditions of all the records in the forwarding table (for example, discarding communication data ), And the dummy record and the communication data are transmitted to the match priority determination unit 26.

(4)マッチ優先度判定部26は、転送テーブル検索部25から送信された各レコードの優先度を判定し、最も優先度の高いレコードを1つだけ選択する。なお、マッチ優先度判定部26aのように、検索結果としてレコードを1つだけ受信する場合には、そのレコードが選択される。マッチ優先度判定部26は、アクション実行部28に通信データと、選択したレコードのアクションを示すアクション情報を送信する(S4)。 (4) The match priority determination unit 26 determines the priority of each record transmitted from the transfer table search unit 25, and selects only one record with the highest priority. When only one record is received as a search result like the match priority determination unit 26a, the record is selected. The match priority determination unit 26 transmits communication data and action information indicating the action of the selected record to the action execution unit 28 (S4).

(5)アクション実行部28は、マッチ優先度判定部26から送信されたアクション情報が示すアクションに応じた通信データ出力装置3に通信データを送信する(S5)。 (5) The action execution unit 28 transmits communication data to the communication data output device 3 corresponding to the action indicated by the action information transmitted from the match priority determination unit 26 (S5).

以下、本実施の形態の効果について説明する。   Hereinafter, effects of the present embodiment will be described.

第一の効果は、入力ポート(通信ポート)ごとに検索テーブルを分けて検索処理を行い、入力ポートごとの通信データの転送処理の独立性を維持しているため、ある入力ポートの転送処理が高負荷であっても、他の入力ポートの転送処理に影響を与えないことである。例えば、複数の入力ポートから受信した通信データを1本にシリアライズして順次処理する場合には、ある入力ポートが大量の通信データを受信し高負荷となっていると、他の入力ポートから受信する通信データにも処理遅延が発生してしまうという問題がある。それに対して、本実施の形態では、入力ポートごとに通信データの転送処理の独立性を維持しているため、そのような処理遅延の発生を抑止することができる。   The first effect is that the search process is performed separately for each input port (communication port), and the independence of the communication data transfer process for each input port is maintained. Even if the load is high, the transfer processing of other input ports is not affected. For example, when serially processing communication data received from a plurality of input ports into one, when a certain input port receives a large amount of communication data and has a high load, it is received from another input port. There is also a problem that processing delay occurs in the communication data. On the other hand, in this embodiment, since the independence of communication data transfer processing is maintained for each input port, occurrence of such processing delay can be suppressed.

第二の効果は、転送テーブルのレコードを各SIMDコアに対して平均的に割り当てているため、SIMD型アクセラレータデバイスを効率的に動作させることができることである。すなわち、各SIMDコアにおける検索処理時間を平均化することができるため、SIMDコアによる他のSIMDコアの処理完了の待ち時間を低減することができる。   The second effect is that the SIMD accelerator device can be operated efficiently because records in the transfer table are allocated to each SIMD core on average. That is, since the search processing time in each SIMD core can be averaged, it is possible to reduce the waiting time for completing the processing of other SIMD cores by the SIMD core.

第三の効果は、転送テーブルに対するSIMDコアの割り当てを静的に決定しているためキャッシュのヒット率が上昇することである。すなわち、レコードのマッチ条件における入力ポートごとに転送テーブルを分割し、入力ポートから受信した通信データについて、その入力ポートに対応する転送テーブルを検索するようにしているため、余分なレコード(他の入力ポートをマッチ条件に含むレコード)の検索を省くことができるからである。   The third effect is that the cache hit rate increases because the assignment of the SIMD core to the forwarding table is statically determined. In other words, the transfer table is divided for each input port in the record matching condition, and the transfer table corresponding to the input port is searched for the communication data received from the input port. This is because a search for a record including a port in a match condition can be omitted.

第四の効果は、ある通信ポートに到着した通信データは、その到着順に処理されることが保障されることである。この理由は、1つの通信ポートに対して、場合によっては複数のSIMDコアが割り当てられて並列的に検索処理をするが、その割り当てられた複数のSIMDコアで処理する通信データは常に1つとなる。そのため、後続の通信データの追い越しが発生しないからである。   A fourth effect is that communication data that arrives at a certain communication port is guaranteed to be processed in the order of arrival. This is because, in some cases, a plurality of SIMD cores are assigned to one communication port and search processing is performed in parallel, but the communication data processed by the assigned plurality of SIMD cores is always one. . Therefore, subsequent communication data is not overtaken.

第五の効果は、CPUからSIMD型アクセラレータデバイスに通信データの検索処理を任せるようにしているため、CPUの空き時間が増えることである。すなわち、CPUで他の処理を並列的に実行している場合に、その処理時間を増加させることができる。これは、上述したように、スイッチ装置100としてサーバを利用し、仮想マシンを動作させる等の他の処理を実行している場合に有効である。   The fifth effect is that the CPU idle time increases because the search processing of communication data is entrusted from the CPU to the SIMD accelerator device. That is, when other processes are executed in parallel by the CPU, the processing time can be increased. As described above, this is effective when a server is used as the switch device 100 and another process such as operating a virtual machine is executed.

<発明の他の実施の形態>
複数のSIMDコアでそれぞれ検索が行われたとき、同一の通信データについて、一つのSIMDコアでのみレコードが検出され、それ以外のSIMDコアではレコードが検出されない(検索結果ゼロ件)ことが好ましい。しかしながら、複数のSIMDコアのそれぞれでレコードが検出される場合がある。
<Other embodiments of the invention>
When a search is performed in each of a plurality of SIMD cores, it is preferable that for the same communication data, a record is detected only in one SIMD core, and no record is detected in other SIMD cores (zero search results). However, a record may be detected by each of a plurality of SIMD cores.

上述の説明では、この場合に対応すべく、レコードが優先度を示すようにし、マッチ優先度判定部26が最も高い優先度を示すレコードを選定するようにする場合について説明した。しかしながら、複数のレコードが検出された場合に検索結果を絞り込む方法は、これに限られない。   In the above description, in order to cope with this case, the case has been described in which the record indicates the priority, and the match priority determination unit 26 selects the record indicating the highest priority. However, the method of narrowing down the search result when a plurality of records is detected is not limited to this.

例えば、マッチ優先度判定部26に代えて、次に説明するような検索結果調整部を備えるようにしてもよい。すなわち、検索結果調整部は、所定のルールに基づいて、複数のSIMDコアが検出したレコードから一つのレコードを選定し、それ以外のレコードは採用しないよう制御を行う。所定のルールとは、例えば次の(1)(2)に示すルールである。   For example, instead of the match priority determination unit 26, a search result adjustment unit as described below may be provided. That is, the search result adjustment unit performs control so that one record is selected from records detected by a plurality of SIMD cores based on a predetermined rule, and other records are not adopted. The predetermined rule is, for example, a rule shown in the following (1) and (2).

(1)予めレコードに番号を付しておき、その番号が最小のレコードを選択する。
(2)予めSIMDコアに番号を付しておき、レコードを検出した複数のSIMDコアのうち、その番号が最小のSIMDコアが検出したレコードを選択する。
(1) Numbers are assigned to records in advance, and the record with the smallest number is selected.
(2) A number is assigned to the SIMD core in advance, and the record detected by the SIMD core having the smallest number is selected from the plurality of SIMD cores from which the record is detected.

<本発明の実施の形態の概略構成>
上述した本発明の実施の形態に係るスイッチ装置100は、次に説明する概略構成としても捉えることができる。図10は、本発明の実施の形態に係るスイッチ装置100の概略構成となるスイッチ装置9の構成図である。
<Schematic configuration of the embodiment of the present invention>
The switch device 100 according to the embodiment of the present invention described above can also be understood as a schematic configuration described below. FIG. 10 is a configuration diagram of the switch device 9 which is a schematic configuration of the switch device 100 according to the embodiment of the present invention.

スイッチ装置9は、転送テーブル記憶部91、転送テーブル細分化部92、及び複数のプロセッサコア93を有する。スイッチ装置9は、外部から受信した通信データの転送先を決定し、決定した転送先に通信データを転送する。   The switch device 9 includes a transfer table storage unit 91, a transfer table subdivision unit 92, and a plurality of processor cores 93. The switch device 9 determines a transfer destination of communication data received from the outside, and transfers the communication data to the determined transfer destination.

転送テーブル記憶部91は、通信データから抽出される検索キーと、当該検索キーが抽出される通信データの転送先とを示す複数のレコードを含む転送テーブルが記憶される。   The transfer table storage unit 91 stores a transfer table including a plurality of records indicating a search key extracted from communication data and a transfer destination of communication data from which the search key is extracted.

転送テーブル細分化部92は、転送テーブルに含まれる複数のレコードのうち、自身に割り当てられたレコードを、通信データから抽出した検索キーで検索をすることで、当該通信データの転送先を決定する。   The transfer table segmentation unit 92 determines a transfer destination of the communication data by searching a record assigned to itself among a plurality of records included in the transfer table with a search key extracted from the communication data. .

複数のプロセッサコア93は、転送テーブルに含まれるレコードの数と、プロセッサコア93の数とに基づいて、転送テーブルを分割して複数のプロセッサコア93のそれぞれにレコードを平均的に割り当てる。   The plurality of processor cores 93 divide the transfer table based on the number of records included in the transfer table and the number of processor cores 93 and assign the records to each of the plurality of processor cores 93 on an average.

以上に説明したスイッチ装置9によれば、プロセッサコアにおける検索処理時間を平均化することができるため、プロセッサコアによる他のプロセッサコアの検索終了の待ち時間を低減し、プロセッサコアの処理効率を向上することができる。   According to the switching device 9 described above, since the search processing time in the processor core can be averaged, the waiting time for the search completion of another processor core by the processor core is reduced, and the processing efficiency of the processor core is improved. can do.

ここで、本発明の実施の形態にかかるスイッチ装置100は、上述の実施の形態の機能を実現するプログラム(スイッチングソフトウェア110を含む)を、コンピュータ(スイッチ装置100)に供給し、スイッチ装置100(CPU101及びGPU104)が実行することによって、構成することが可能である。   Here, the switch device 100 according to the embodiment of the present invention supplies a program (including the switching software 110) for realizing the functions of the above-described embodiments to the computer (switch device 100), and the switch device 100 ( It can be configured by being executed by the CPU 101 and the GPU 104).

なお、上述のコンピュータ(スイッチ装置100)が実行するプログラムは、様々なタイプの非一時的なコンピュータ可読媒体(non-transitory computer readable medium)を用いて格納され、コンピュータ(スイッチ装置100)に供給することができる。非一時的なコンピュータ可読媒体は、様々なタイプの実体のある記録媒体(tangible storage medium)を含む。非一時的なコンピュータ可読媒体の例は、磁気記録媒体(例えばフレキシブルディスク、磁気テープ、ハードディスクドライブ)、光磁気記録媒体(例えば光磁気ディスク)、CD−ROM(Read Only Memory)、CD−R、CD−R/W、半導体メモリ(例えば、マスクROM、PROM(Programmable ROM)、EPROM(Erasable PROM)、フラッシュROM、RAM(Random Access Memory))を含む。また、プログラムは、様々なタイプの一時的なコンピュータ可読媒体(transitory computer readable medium)によってコンピュータに供給されてもよい。一時的なコンピュータ可読媒体の例は、電気信号、光信号、及び電磁波を含む。一時的なコンピュータ可読媒体は、電線及び光ファイバ等の有線通信路、又は無線通信路を介して、プログラムをコンピュータに供給できる。   The program executed by the above-described computer (switch device 100) is stored using various types of non-transitory computer readable media and supplied to the computer (switch device 100). be able to. Non-transitory computer readable media include various types of tangible storage media. Examples of non-transitory computer-readable media include magnetic recording media (for example, flexible disks, magnetic tapes, hard disk drives), magneto-optical recording media (for example, magneto-optical disks), CD-ROMs (Read Only Memory), CD-Rs, CD-R / W, semiconductor memory (for example, mask ROM, PROM (Programmable ROM), EPROM (Erasable PROM), flash ROM, RAM (Random Access Memory)) are included. Further, the program may be supplied to the computer by various types of transitory computer readable media. Examples of transitory computer readable media include electrical signals, optical signals, and electromagnetic waves. The temporary computer-readable medium can supply the program to the computer via a wired communication path such as an electric wire and an optical fiber, or a wireless communication path.

なお、本発明は上記実施の形態に限られたものではなく、趣旨を逸脱しない範囲で適宜変更することが可能である。   Note that the present invention is not limited to the above-described embodiment, and can be changed as appropriate without departing from the spirit of the present invention.

1 通信データ入力装置
2 データ処理装置
3 通信データ出力装置
11 通信データ入力制御部
12 データ転送部
21 入力データ記憶部
22 転送テーブル記憶部
23 転送テーブル細分化部
24 細分化転送テーブル記憶部
25 転送テーブル検索b
26 マッチ優先度判定部
27 転送テーブル制御情報受信処理
28 アクション実行部
29 転送テーブル分割部
30 出力データ記憶部
31 SIMDコア
100 スイッチ装置
101 CPU
102 メインメモリ
103 ビデオメモリ
104 GPU
110 スイッチングソフトウェア
201、202、203 通信ポート
1 communication data input device 2 data processing device 3 communication data output device 11 communication data input control unit 12 data transfer unit 21 input data storage unit 22 transfer table storage unit 23 transfer table subdivision unit 24 subdivision transfer table storage unit 25 transfer table Search b
26 Match priority determination unit 27 Transfer table control information reception process 28 Action execution unit 29 Transfer table division unit 30 Output data storage unit 31 SIMD core 100 Switch device 101 CPU
102 main memory 103 video memory 104 GPU
110 Switching software 201, 202, 203 Communication port

Claims (9)

外部から受信した通信データの転送先を決定し、決定した転送先に前記通信データを転送するスイッチ装置であって、
前記通信データから抽出される検索キーと、当該検索キーが抽出される通信データの転送先とを示す複数のレコードを含む転送テーブルが記憶される転送テーブル記憶部と、
前記転送テーブルに含まれる複数のレコードのうち、自身に割り当てられたレコードを、前記通信データから抽出した検索キーで検索をすることで、当該通信データの転送先を決定する複数のプロセッサコアと、
前記転送テーブルに含まれるレコードの数と、前記プロセッサコアの数とに基づいて、前記転送テーブルを分割して前記複数のプロセッサコアのそれぞれに前記レコードを平均的に割り当てる転送テーブル細分化部と、
を備えたスイッチ装置。
A switch device that determines a transfer destination of communication data received from outside, and transfers the communication data to the determined transfer destination,
A transfer table storage unit for storing a transfer table including a plurality of records indicating a search key extracted from the communication data and a transfer destination of the communication data from which the search key is extracted;
Among a plurality of records included in the transfer table, a plurality of processor cores that determine a transfer destination of the communication data by searching a record assigned to itself with a search key extracted from the communication data;
Based on the number of records included in the transfer table and the number of processor cores, a transfer table subdividing unit that divides the transfer table and assigns the records to each of the plurality of processor cores on average.
A switch device comprising:
前記スイッチ装置は、複数の入力ポートのそれぞれを介して前記通信データを受信するものであって、
前記レコードは、さらに、前記入力ポートを示すとともに、前記転送先として、当該入力ポートを介して受信される通信データの転送先を示し、
前記スイッチ装置は、さらに、前記転送テーブルを、前記レコードが示す入力ポートが同一となるレコード群に分割する転送レコード分割部を備え、
前記転送テーブル細分化部は、前記レコード群のそれぞれをさらに分割することで、同一のプロセッサコアに割り当てられるレコードが同一の入力ポートを示すように、前記複数のプロセッサコアのそれぞれに前記レコードを割り当て、
前記複数のプロセッサコアのそれぞれは、自身に割り当てられたレコードが示す入力ポートを介して受信した通信データの転送先を決定する、
請求項1に記載のスイッチ装置。
The switch device receives the communication data via each of a plurality of input ports,
The record further indicates the input port and, as the transfer destination, indicates a transfer destination of communication data received via the input port,
The switch device further includes a transfer record dividing unit that divides the transfer table into record groups having the same input port indicated by the record,
The transfer table subdivision unit further divides each of the record groups to assign the records to each of the plurality of processor cores so that the records assigned to the same processor core indicate the same input port. ,
Each of the plurality of processor cores determines a transfer destination of communication data received via an input port indicated by a record assigned to the processor core.
The switch device according to claim 1.
前記複数のレコードは、さらに、優先度を示し、
前記スイッチ装置は、さらに、同一の通信データの転送先が2つ以上のプロセッサコアによって決定された場合、当該2つ以上の転送先のうち、最も高い優先度を示すレコードにおける転送先を、当該通信データの転送先として決定する優先度判定部を備えた、
請求項1又は2に記載のスイッチ装置。
The plurality of records further indicate a priority,
The switch device may further include a transfer destination in a record indicating the highest priority among the two or more transfer destinations when the transfer destination of the same communication data is determined by two or more processor cores. With a priority determination unit that determines the transfer destination of communication data,
The switch device according to claim 1 or 2.
前記プロセッサコアは、自身に割り当てられたレコードから前記通信データの転送先として複数の転送先を検出した場合、当該複数の転送先のうち、最も高い優先度を示すレコードにおける転送先を、当該通信データの転送先として決定する、
請求項3に記載のスイッチ装置。
When the processor core detects a plurality of transfer destinations as the transfer destination of the communication data from the record assigned to itself, the processor core determines the transfer destination in the record indicating the highest priority among the plurality of transfer destinations. Determine the data transfer destination,
The switch device according to claim 3.
前記スイッチ装置は、さらに、同一の通信データの転送先が2つ以上のプロセッサコアによって決定された場合、当該2つ以上の転送先から、所定のルールに従って1つの転送先を選定し、当該通信データの転送先として決定する検索結果調整部を備えた、
請求項1又は2に記載のスイッチ装置。
The switch device further selects one transfer destination according to a predetermined rule from the two or more transfer destinations when the transfer destination of the same communication data is determined by two or more processor cores. It has a search result adjustment unit that determines the data transfer destination,
The switch device according to claim 1 or 2.
前記スイッチ装置は、さらに、
前記複数のプロセッサコアを有するSIMD型アクセラレータデバイスと、
前記通信データを受信した場合に、前記SIMD型アクセラレータデバイスに当該通信データの転送先の決定を指示し、当該指示に応じて当該SIMD型アクセラレータデバイスによって決定された転送先への当該通信データを転送するCPUと、
を備えた請求項1に記載のスイッチ装置。
The switch device further includes:
A SIMD type accelerator device having the plurality of processor cores;
When the communication data is received, the SIMD accelerator device is instructed to determine the transfer destination of the communication data, and the communication data is transferred to the transfer destination determined by the SIMD accelerator device according to the instruction CPU to
The switch device according to claim 1, comprising:
前記スイッチ装置は、さらに、
前記転送テーブルにおけるレコードの更新を指示する転送テーブル制御情報を外部から受信し、受信した転送テーブル制御情報に基づいて、前記転送テーブル記憶部に記憶された転送テーブルを更新する転送テーブル制御情報受信処理部を備える、
請求項1乃至6のいずれか1項に記載のスイッチ装置。
The switch device further includes:
Transfer table control information reception processing for receiving transfer table control information for instructing update of a record in the transfer table from the outside and updating the transfer table stored in the transfer table storage unit based on the received transfer table control information Comprising a part,
The switch device according to claim 1.
受信した通信データの転送先を決定し、決定した転送先に前記通信データを転送するデータ転送制御方法であって、
前記通信データから抽出される検索キーと、当該検索キーが抽出される通信データの転送先とを示す複数のレコードを含む転送テーブルを転送テーブル記憶部に記憶する記憶ステップと、
前記転送テーブルに含まれる複数のレコードを、複数のプロセッサコアに割り当てる割当ステップと、
前記複数のプロセッサコアが、前記転送テーブルに含まれる複数のレコードのうち、自身に割り当てられたレコードを、前記通信データから抽出した検索キーで検索をすることで、当該通信データの転送先を決定する検索ステップと、を備え、
前記割当ステップでは、前記転送テーブルに含まれるレコードの数と、前記プロセッサコアの数とに基づいて、前記転送テーブルを分割して前記複数のプロセッサコアのそれぞれに前記レコードを平均的に割り当てる、
データ転送制御方法。
A data transfer control method for determining a transfer destination of received communication data and transferring the communication data to the determined transfer destination,
Storing a transfer table including a plurality of records indicating a search key extracted from the communication data and a transfer destination of the communication data from which the search key is extracted, in a transfer table storage unit;
Assigning a plurality of records included in the transfer table to a plurality of processor cores;
The plurality of processor cores determine a transfer destination of the communication data by searching for a record assigned to itself among a plurality of records included in the transfer table with a search key extracted from the communication data. And a search step to
In the allocating step, based on the number of records included in the transfer table and the number of processor cores, the transfer table is divided and the records are allocated to each of the plurality of processor cores on average.
Data transfer control method.
受信した通信データの転送先を決定し、決定した転送先に前記通信データを転送するためのデータ転送制御プログラムであって、
前記通信データから抽出される検索キーと、当該検索キーが抽出される通信データの転送先とを示す複数のレコードを含む転送テーブルを転送テーブル記憶部に記憶する記憶処理と、
前記転送テーブルに含まれる複数のレコードを、複数のプロセッサコアに割り当てる割当処理と、
前記複数のプロセッサコアが、前記転送テーブルに含まれる複数のレコードのうち、自身に割り当てられたレコードを、前記通信データから抽出した検索キーで検索をすることで、当該通信データの転送先を決定する検索処理と、をコンピュータに実行させ、
前記割当処理では、前記転送テーブルに含まれるレコードの数と、前記プロセッサコアの数とに基づいて、前記転送テーブルを分割して前記複数のプロセッサコアのそれぞれに前記レコードを平均的に割り当てる、
データ転送制御プログラム。
A data transfer control program for determining a transfer destination of received communication data and transferring the communication data to the determined transfer destination,
A storage process for storing a transfer table including a plurality of records indicating a search key extracted from the communication data and a transfer destination of the communication data from which the search key is extracted;
An allocation process for allocating a plurality of records included in the transfer table to a plurality of processor cores;
The plurality of processor cores determine a transfer destination of the communication data by searching for a record assigned to itself among a plurality of records included in the transfer table with a search key extracted from the communication data. Search processing to be executed by a computer,
In the allocation process, based on the number of records included in the transfer table and the number of processor cores, the transfer table is divided and the records are allocated to each of the plurality of processor cores on average.
Data transfer control program.
JP2014046569A 2014-03-10 2014-03-10 Switch device, data transfer control method, and data transfer control program Expired - Fee Related JP6372103B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014046569A JP6372103B2 (en) 2014-03-10 2014-03-10 Switch device, data transfer control method, and data transfer control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014046569A JP6372103B2 (en) 2014-03-10 2014-03-10 Switch device, data transfer control method, and data transfer control program

Publications (2)

Publication Number Publication Date
JP2015171089A JP2015171089A (en) 2015-09-28
JP6372103B2 true JP6372103B2 (en) 2018-08-15

Family

ID=54203428

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014046569A Expired - Fee Related JP6372103B2 (en) 2014-03-10 2014-03-10 Switch device, data transfer control method, and data transfer control program

Country Status (1)

Country Link
JP (1) JP6372103B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2011078108A1 (en) * 2009-12-21 2013-05-09 日本電気株式会社 Pattern matching method and apparatus in multiprocessor environment
JP5935873B2 (en) * 2012-03-05 2016-06-15 日本電気株式会社 Network system, switch, and network construction method

Also Published As

Publication number Publication date
JP2015171089A (en) 2015-09-28

Similar Documents

Publication Publication Date Title
CN108260169B (en) A Dynamic Deployment Method of Service Function Chain Based on QoS Guarantee
EP3560148B1 (en) Database functions-defined network switch
CN104885422B (en) Method and apparatus for maintaining packet order in parallel processing network devices
CN109408257B (en) Data transmission method and device for Network On Chip (NOC) and electronic equipment
WO2012114398A1 (en) Network system, controller, and flow control method
US10263809B2 (en) Selecting an optimal network device for reporting flow table misses upon expiry of a flow in a software defined network
US9954766B2 (en) Centralized network control system
JP6574054B2 (en) Packet forwarding
JP6569374B2 (en) Switch device and control method of switch device
JP6574314B2 (en) Packet forwarding
WO2018107908A1 (en) Message transmission method, and switch
JP2018185624A (en) Switch program, switching method, and information processing apparatus
US20180041437A1 (en) Management apparatus and management method
US20160308696A1 (en) Packet relay device, and copy function distribution method of packet relay device
JP6437692B2 (en) Packet forwarding
WO2017084228A1 (en) Method for managing traffic item in software-defined networking
WO2016177191A1 (en) Packet processing method and device
EP3292660B1 (en) Packet forwarding in a vxlan switch
JP5704567B2 (en) Node device, system, and packet processing method
US20150263990A1 (en) Network device, control method, and program
WO2014157512A1 (en) System for providing virtual machines, device for determining paths, method for controlling paths, and program
CN107291638A (en) Parallel processing apparatus and the method for control communication
JP6287443B2 (en) Control device and table creation method thereof
JP6372103B2 (en) Switch device, data transfer control method, and data transfer control program
CN107124362A (en) A kind of flow table storage optimization method and device split based on subflow table

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170210

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20171207

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20171219

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180619

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180702

R150 Certificate of patent or registration of utility model

Ref document number: 6372103

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees