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 PDFInfo
- 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
Links
- 238000012546 transfer Methods 0.000 title claims description 341
- 238000000034 method Methods 0.000 title claims description 35
- 238000004891 communication Methods 0.000 claims description 264
- 238000012545 processing Methods 0.000 claims description 55
- 230000008569 process Effects 0.000 claims description 23
- 238000013500 data storage Methods 0.000 description 53
- 230000000875 corresponding effect Effects 0.000 description 39
- 230000009471 action Effects 0.000 description 37
- 238000010586 diagram Methods 0.000 description 12
- 230000006870 function Effects 0.000 description 11
- 230000000694 effects Effects 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000013467 fragmentation Methods 0.000 description 2
- 238000006062 fragmentation reaction Methods 0.000 description 2
- 230000011218 segmentation Effects 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000001152 differential interference contrast microscopy Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
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内の共有メモリに保持するようにしている。
しかしながら、特許文献1には、フローテーブルの分割の仕方については全く開示がされていない。よって、特許文献1には、次に説明するような問題が発生することがある。以下、図を参照して、その問題点について説明する。なお、以下に説明する内容は、本願発明者が新たに検討した内容であって、従来技術を説明するものではない。
However,
図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型アーキテクチャでは、同一のインストラクショングループに属する全てのSIMDコア301〜303は、同一命令を実行する必要があり、自身の処理が終了したとしても、他のSIMDコアの処理の終了を待たなければいけない。よって、図11に例示する場合には、検索処理のステップ数(参照する転送テーブルのレコード数)が多いSIMDコアは、検索処理のステップ数が少ないSIMDコアによって待たされることになる。
In the SIMD type architecture, all the
すなわち、図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コアで分散して並列的に転送テーブルを検索する場合、元となる転送テーブルを考慮なしに分割し、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.
<発明の実施の形態>
以下に図面を参照しながら、本発明の好適な実施の形態について説明する。以下の実施の形態に示す具体的な数値等は、発明の理解を容易とするための例示にすぎず、特に断る場合を除き、それに限定されるものではない。また、以下の記載及び図面では、説明の明確化のため、当業者にとって自明な事項等については、適宜、省略及び簡略化がなされている。
<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
スイッチ装置100は、CPU(Central Processing Unit)101、メインメモリ102、ビデオメモリ103、及びGPU(Graphics Processing Unit)104を有する。
The
CPU101は、スイッチ装置100を統括的に制御する。CPU101は、メインメモリ102に記憶されたスイッチングソフトウェア(スイッチングプログラム)110を実行することで、ソフトウェアスイッチ(仮想スイッチ)としての機能をスイッチ装置100上で実現する。
The
メインメモリ102は、CPU101によって使用される各種情報、及び、CPU101の演算結果等が記憶される。また、メインメモリ102は、CPU101とGPU104との間の情報の受け渡しにも利用される。CPU101は、GPU104に受け渡す情報をメインメモリ102に記憶することで、メインメモリ102からビデオメモリ103に、その情報を転送する。この情報の転送は、例えば、DMA転送によって実施する。
The
ビデオメモリ103は、GPU104によって使用される各種情報、及び、GPU104の演算結果等が記憶される。また、ビデオメモリ103は、CPU101とGPU104との間の情報の受け渡しにも利用される。GPU104は、CPU101に受け渡す情報をビデオメモリ103に記憶することで、ビデオメモリ103からメインメモリ102に、その情報を転送する。この情報の転送は、例えば、DMA転送によって実施する。
The
GPU104は、CPU101からの命令に従って各種処理を実行する。GPU104は、SIMD型アーキテクチャで動作するSIMD型アクセラレータデバイスである。本実施の形態では、SIMD型アクセラレータデバイスとして、GPUを採用した例について説明するが、同様の処理を実行可能なSIMD型アクセラレータデバイスであれば、これに限られない。また、アクセラレータデバイスは、同様の処理を実行可能であれば、SIMD型であることには限定されない。
The
通信ポート201〜203は、上述のソフトウェアスイッチと接続される通信ポートに相当する。通信ポート201〜203は、通信データ(パケット)を送受信する。通信ポート201〜203は、通信データを受信してソフトウェアスイッチへ送信する入力ポート、及び、外部に対して送信する出力ポートとして機能する。なお、本実施の形態では、通信ポートの数が3つである場合について例示するが、その数はこの例に限られない。また、通信ポートは受信専用の通信ポート、および送信専用の通信ポートが存在してもよい。
The
上述した構成により、スイッチ装置100は、次のように動作する。CPU101は、通信ポート201〜203を介して通信データを受信した場合に、その通信データの転送先の決定をGPU104に指示する。GPU104は、CPU101からの指示に応じて、通信データから抽出した情報に基づいて、転送テーブルからその通信データの転送先を検索する。ここで、GPU104は、後述するように複数のSIMDコアを有しており、それら複数のSIMDコアによって並列的に検索を行う。GPU104は、検索した転送先をCPU101に通知する。CPU101は、GPU104から通知された転送先に、通信データを転送する。
With the above-described configuration, the
ここで、スイッチ装置100は、例えば、1つ以上の仮想マシンを構築可能なサーバである。そして、スイッチ装置100は、上述の装置101〜104によって、仮想マシン間を接続するソフトウェアスイッチを実現する。
Here, the
続いて、図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
図2に示すように、スイッチ装置100は、複数の通信データ入力装置1、データ処理装置2、複数の通信データ出力装置3を有する。
As illustrated in FIG. 2, the
通信データ入力装置1の数は通信ポート201〜203のうち受信機能を持つ通信ポートと同数となる。また、通信データ出力装置3の数は同様に送信機能を持つ通信ポートと同数となる。通信ポート201〜203のすべてが送受信機能を持つ場合、通信データ入力装置1及び通信データ出力装置3のそれぞれの数と同じとなる。以下、3つの通信データ入力装置1を、それぞれ、通信データ入力装置1a、通信データ入力装置1b、通信データ入力装置1cとも呼ぶ。また、3つの通信データ出力装置3を、それぞれ、通信データ出力装置3a、3b、3cとも呼ぶ。
The number of communication
図3に示すように、通信データ入力装置1は、通信データ入力制御部11及びデータ転送部12を有する。以下、通信データ入力装置1a〜1cにおける通信データ入力制御部11のそれぞれを、通信データ入力制御部11a、11b、11cとも呼ぶ。また、通信データ入力装置1a〜1cにおけるデータ転送部12のそれぞれを、データ転送部12a、データ転送部12b、データ転送部12cとも呼ぶ。
As illustrated in FIG. 3, the communication
通信データ入力制御部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
データ転送部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
図4に示すように、データ処理装置2は、複数の入力データ記憶部21、転送テーブル記憶部22、転送テーブル細分化部23、複数の細分化転送テーブル記憶部24、転送テーブル検索部25、複数のマッチ優先度判定部26、転送テーブル制御情報受信処理部27、複数のアクション実行部28、転送テーブル分割部29、複数の出力データ記憶部30を有している。
As shown in FIG. 4, the
入力データ記憶部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
入力データ記憶部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
転送テーブル記憶部22は、転送テーブルを予め記憶している。転送テーブル記憶部22は、転送テーブル制御情報受信処理部27から転送された転送テーブル制御情報に基づいて転送テーブルを更新する。転送テーブルにおけるレコードは、以下の(1)〜(3)の情報を含んでいる。
(1)優先度
(2)マッチ条件
(3)アクション
The transfer
(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
レコードは、例えば、具体的には以下のような内容が示される。 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
[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
このような転送テーブルを作成するものとして代表的なプロトコルに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
転送テーブル細分化部23は、転送テーブル分割部29に記憶された転送テーブルのレコード数とSIMDコア数とを比較し、各SIMDコアに割り当てるレコードを決定する。転送テーブル細分化部23は、決定した割り当てに従って、転送テーブル分割部29によって分割された転送テーブルをさらに細分化し、細分化転送テーブル記憶部24a〜24fのそれぞれに記憶する。また、転送テーブル細分化部23は、各SIMDコアに対応する細分化転送テーブル記憶部24及び入力データ記憶部21を示すSIMDコア割り当て情報を転送テーブル検索部25に通知する。
The transfer
ここで、転送テーブル細分化部23は、SIMDコアが処理するレコード数がおおよそ同じ数となるように平均化して各転送テーブル(転送テーブル分割部29によって分割された各転送テーブル)を細分化する。これは、各SIMDコアに割り当てられるレコード数が、同じ数により近づくように決定されるのであれば、任意の方法を採用するようにしてよい。例えば、最初に転送テーブル291〜293のそれぞれにSIMDコアを1つ割り当て、転送テーブル291〜293のそれぞれについて、割り当てられたSIMDコアでレコード数を割り算した結果が最も多いものに順次SIMDコアを追加していく処理を、割り当て可能なSIMDコアが無くなるまで繰り返す方法などによって決定してもよい。
Here, the transfer
また、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
図6に示すように、転送テーブル検索部25は、複数のSIMDコア31を有している。この複数のSIMDコア31は、上述したようにGPU104が有するものである。また、上述したように、転送テーブル検索部25が使用する複数のSIMDコア31a〜31fの数は、細分化転送テーブル記憶部24a〜24fの数と同じとなる。
As shown in FIG. 6, the transfer
ここで、本実施の形態では、転送テーブル細分化部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
この場合、転送テーブル細分化部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
なお、図6にも示すように、細分化転送テーブル記憶部24、転送テーブル検索部25、マッチ優先度判定部26は、SIMD型アーキテクチャ(ビデオメモリ103、GPU104等)で実現される。また、その他(入力データ記憶部21、転送テーブル記憶部22、転送テーブル細分化部23、転送テーブル制御情報受信処理部27、アクション実行部28、転送テーブル分割部29、及び出力データ記憶部30等)は、CPU101及びメインメモリ102等で実現される。
As shown in FIG. 6, the segmented transfer
転送テーブル検索部25は、転送テーブル細分化部23から出力されたSIMDコア割り当て情報に従って、入力データ記憶部21に記憶された通信データと、細分化転送テーブル記憶部24に記憶されたレコードのマッチ条件とを比較して検索をする。
The transfer
すなわち、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コア31aが含まれるインストラクショングループと、SIMDコア31b、31cが含まれるインストラクショングループと、SIMDコア31d〜31fが含まれるインストラクショングループとが存在することになる。すなわち、転送テーブル検索部25は、SIMDコア割り当て情報に基づいて、SIMDコア31a〜31fを異なるインストラクショングループに分ける。
Therefore, in this example, there are an instruction group including the
また、転送テーブル検索部25は、マッチ条件にヒットしたレコードが無い場合に使用するダミーのレコードを記憶している。転送テーブル検索部25は、マッチ条件にヒットするレコードを検出した場合、そのヒットしたレコードと通信データをマッチ優先度判定部26に出力する。転送テーブル検索部25は、マッチ条件にヒットするレコードを検出できなかった場合、ダミーのレコードをマッチ優先度判定部26に出力する。このレコードは、例えば、優先度が最低、アクションとして、通信データを破棄、を示すようにすればよい。
Further, the transfer
ここで、入力データ記憶部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
マッチ優先度判定部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
ここで、マッチ優先度判定部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
アクション実行部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
出力データ記憶部30は、アクション実行部28によって記憶された通信データを、自身に対応する通信データ出力装置3に出力する。出力データ記憶部30aは、通信データ出力装置3aに対応し、出力データ記憶部30bは、通信データ出力装置3bに対応し、出力データ記憶部30cは、通信データ出力装置3cに対応する。
The output
すなわち、出力データ記憶部30として機能するCPU101は、同じく出力データ記憶部30として機能するメモリ102に記憶された通信データを、その出力データ記憶部30に対応する通信データ出力装置3に出力する。
That is, the
よって、アクション実行部28は、通信データを通信データ出力装置3(通信ポート)に出力、のアクションにおける転送先として、通信データ出力装置3aが示されている場合は通信データを出力データ記憶部30aに記憶し、通信データ出力装置3bが示されている場合は通信データを出力データ記憶部30bに記憶し、通信データ出力装置3cが示されている場合は通信データを出力データ記憶部30cに記憶する。
Therefore, the action execution unit 28 outputs the communication data to the output
通信データ出力装置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
すなわち、各入力ポート(通信ポート201〜203)から受信した通信データの転送先をデータ処理装置2によって検索し、検索結果に応じた転送先となる通信データ出力装置3(通信ポート201〜203のいずれか)に転送することで、通信データを所望の転送先(例えば仮想マシン)に転送することができる。
That is, the transfer destination of the communication data received from each input port (
以上に説明したように、本実施の形態では、通信ポート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
また、このように、通信ポートで独立性を保っているため、ある通信ポートが高負荷となったとしても、他の通信ポートで受信される通信データまでもが滞留してしまうといったことが無くなる。 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
スイッチ装置100は、通信データを処理する前に、以下の動作を予め行う。
The
(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
(2)転送テーブル制御情報受信処理部27は、外部から転送テーブル制御情報を受信し、優先度、マッチ条件、及びアクションを含む転送テーブルのレコードを作成し、転送テーブル記憶部22に記憶する。
(2) The transfer table control information
(3)転送テーブル分割部29は、転送テーブル記憶部22からレコードを受け取り、マッチ条件にある入力ポートが同一となるテーブル群ごとに転送テーブルを分ける。すなわち、図5に示すように転送テーブルを分割する。
(3) The transfer
(4)転送テーブル細分化部23は、転送テーブル分割部29よって作成された入力ポートごとの転送テーブルを読み込み、レコードの数とSIMDコアの数を比較して、各SIMDコアが処理するレコード数が平均化されるように転送テーブルをさらに分割する。転送テーブル細分化部23は、それと同時に、細分化された転送テーブルのそれぞれの処理を担当するSIMDコアの割り当てを決定する。転送テーブル細分化部23は、細分化した転送テーブルを、その転送テーブルの処理を担当するSIMDコアに対応する細分化転送テーブル記憶部24に記憶する。また、転送テーブル細分化部23は、それと同時に、転送テーブル検索部25にSIMDコア割り当て情報を通知する。
(4) The transfer
図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
これによれば、図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
すなわち、この場合における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
以下、通信データの処理について説明する。 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
(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
(5)アクション実行部28は、マッチ優先度判定部26から送信されたアクション情報が示すアクションに応じた通信データ出力装置3に通信データを送信する(S5)。
(5) The action execution unit 28 transmits communication data to the communication
以下、本実施の形態の効果について説明する。 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
<発明の他の実施の形態>
複数の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
スイッチ装置9は、転送テーブル記憶部91、転送テーブル細分化部92、及び複数のプロセッサコア93を有する。スイッチ装置9は、外部から受信した通信データの転送先を決定し、決定した転送先に通信データを転送する。
The switch device 9 includes a transfer
転送テーブル記憶部91は、通信データから抽出される検索キーと、当該検索キーが抽出される通信データの転送先とを示す複数のレコードを含む転送テーブルが記憶される。
The transfer
転送テーブル細分化部92は、転送テーブルに含まれる複数のレコードのうち、自身に割り当てられたレコードを、通信データから抽出した検索キーで検索をすることで、当該通信データの転送先を決定する。
The transfer
複数のプロセッサコア93は、転送テーブルに含まれるレコードの数と、プロセッサコア93の数とに基づいて、転送テーブルを分割して複数のプロセッサコア93のそれぞれにレコードを平均的に割り当てる。
The plurality of
以上に説明したスイッチ装置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
なお、上述のコンピュータ(スイッチ装置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
26 Match
102
110
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.
請求項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.
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)
| 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 |
-
2014
- 2014-03-10 JP JP2014046569A patent/JP6372103B2/en not_active Expired - Fee Related
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 |