JP4060348B2 - Data processing device - Google Patents
Data processing device Download PDFInfo
- Publication number
- JP4060348B2 JP4060348B2 JP2007234536A JP2007234536A JP4060348B2 JP 4060348 B2 JP4060348 B2 JP 4060348B2 JP 2007234536 A JP2007234536 A JP 2007234536A JP 2007234536 A JP2007234536 A JP 2007234536A JP 4060348 B2 JP4060348 B2 JP 4060348B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- comparison
- processing
- circuit
- reference data
- 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
Images
Landscapes
- Communication Control (AREA)
Description
本発明は、データ処理技術に関し、特に、通信データを処理するデータ処理装置に関する。 The present invention relates to a data processing technique, and more particularly to a data processing apparatus that processes communication data.
インターネットのインフラが整備され、携帯電話端末、パーソナルコンピュータ、VoIP(Voice over Internet Protocol)電話端末などの通信端末が広く普及した現在、インターネットの利用者は爆発的に増加している。このような状況下、コンピュータウイルス、ハッキング、スパムメールなど、セキュリティに関する問題が顕在化しており、通信を適切に制御する技術が求められている。通信環境の向上に伴って通信量も膨大になっており、大容量のデータを高速に処理する通信制御装置の必要性が増している。 With the development of the Internet infrastructure and the widespread use of communication terminals such as mobile phone terminals, personal computers, and VoIP (Voice over Internet Protocol) telephone terminals, the number of Internet users is increasing explosively. Under such circumstances, security problems such as computer viruses, hacking, and spam mails are becoming obvious, and a technique for appropriately controlling communication is required. With the improvement of the communication environment, the amount of communication has become enormous, and the need for a communication control device that processes large volumes of data at high speed is increasing.
図1は、従来の通信制御装置1の構成を示す。従来の通信制御装置1は、受信側の通信制御部2と、パケット処理部3と、送出側の通信制御部4とを備える。通信制御部2及び4は、それぞれ、パケットの物理層の処理を行うPHY処理部5a及び5bと、パケットのMAC層の処理を行うMAC処理部6a及び6bとを備える。パケット処理部3は、IP(Internet Protocol)のプロトコル処理を行うIP処理部7、TCP(Transport Control Protocol)のプロトコル処理を行うTCP処理部8など、プロトコルに応じた処理を行うプロトコル処理部と、アプリケーション層の処理を行うAP処理部9とを備える。AP処理部9は、パケットに含まれるデータに応じて、フィルタリングなどの処理を実行する。
従来の通信制御装置1では、パケット処理部3は、汎用プロセッサであるCPUと、CPU上で動作するOSとを利用して、ソフトウェアにより実現されていた。しかしながら、このような構成では、通信制御装置1の性能はCPUの性能に依存することになり、高速に大容量のパケットを処理可能な通信制御装置を実現しようとしても、自ずと限界がある。例えば、64ビットのCPUであれば、一度に同時に処理可能なデータ量は最大で64ビットであり、それ以上の性能を有する通信制御装置は存在しなかった。また、汎用的な機能を有するOSの存在を前提としていたので、セキュリティホールなどが存在する可能性が絶無ではなく、OSのバージョンアップなどのメンテナンス作業を必要としていた。
In the conventional
本発明はこうした状況に鑑みてなされたものであり、その目的は、高速なデータ処理装置を実現する技術の提供にある。 The present invention has been made in view of such circumstances, and an object thereof is to provide a technique for realizing a high-speed data processing apparatus.
本発明のある態様は、データ処理装置に関する。このデータ処理装置は、取得したデータに対して実行する処理の内容を決定するための基準となる基準データを記憶する第1記憶部と、前記データの中に前記基準データが含まれているか否かを、前記データと前記基準データとを比較することにより検索する検索部と、前記検索部による検索結果と前記処理の内容とを対応づけて記憶する第2記憶部と、前記検索結果に基づいて、前記検索結果に対応づけられた処理の内容を前記データに対して実行する処理部と、を含み、前記検索部は、ワイヤードロジック回路により構成されることを特徴とする。 One embodiment of the present invention relates to a data processing apparatus. The data processing apparatus includes a first storage unit that stores reference data serving as a reference for determining the content of processing to be performed on acquired data, and whether the reference data is included in the data. Based on the search result, a search unit for searching by comparing the data and the reference data, a second storage unit for storing the search result by the search unit and the content of the process in association with each other A processing unit that executes the processing contents associated with the search result on the data, and the search unit is configured by a wired logic circuit.
検索部又は処理部は、FPGA(Field Programmable Gate Array)などを用いて実現されてもよい。専用のハードウェア回路により検索部を構成することにより、CPUの性能の制約にとらわれず、所望の性能を有するデータ処理装置を実現することができる。 The search unit or the processing unit may be realized using an FPGA (Field Programmable Gate Array) or the like. By configuring the search unit with a dedicated hardware circuit, it is possible to realize a data processing apparatus having a desired performance without being restricted by the performance of the CPU.
前記ワイヤードロジック回路は、前記データと前記基準データとをビット単位で比較する第1比較回路を複数含んでもよい。第1比較回路を、例えば64個以上並列に設けることにより、CPUよりも多いビット数を一度に比較可能な回路を実現することができる。 The wired logic circuit may include a plurality of first comparison circuits that compare the data and the reference data in bit units. By providing, for example, 64 or more first comparison circuits in parallel, a circuit capable of comparing a larger number of bits than the CPU at a time can be realized.
前記検索部は、前記通信データの中から前記基準データと比較すべき比較対象データの位置を検出する位置検出回路を含んでもよい。前記位置検出回路は、前記比較対象データの位置を特定するための位置特定データと前記通信データとを比較する第2比較回路を複数含み、前記複数の第2比較回路に前記通信データを所定のデータ長ずつ位置をずらして入力し、前記位置特定データと同時に並列して比較してもよい。第2比較回路を複数設けることにより、一度に複数の位置を判定することができるので、より高速に比較対象データの位置を検出することができる。 The search unit may include a position detection circuit that detects a position of comparison target data to be compared with the reference data from the communication data. The position detection circuit includes a plurality of second comparison circuits that compare the position specifying data for specifying the position of the comparison target data and the communication data, and the communication data is given to the plurality of second comparison circuits by a predetermined amount. It is also possible to input the data by shifting the position by the data length and compare in parallel with the position specifying data. By providing a plurality of second comparison circuits, a plurality of positions can be determined at a time, so that the position of the comparison target data can be detected at a higher speed.
前記検索部は、バイナリサーチにより前記通信データの中に前記基準データが含まれているか否かを検索するバイナリサーチ回路を含んでもよい。前記第1記憶部に保持可能なデータ数よりも前記基準データのデータ数の方が少ない場合、前記第1記憶部の最終データ位置から降順に前記基準データを格納し、残りのデータに0を格納してもよい。基準データが0である場合には比較を実行することなく次のバイナリサーチにうつることができるので、バイナリサーチをより高速に実行することができる。 The search unit may include a binary search circuit for searching whether or not the reference data is included in the communication data by binary search. When the number of data of the reference data is smaller than the number of data that can be held in the first storage unit, the reference data is stored in descending order from the last data position of the first storage unit, and 0 is set to the remaining data. It may be stored. When the reference data is 0, the next binary search can be performed without executing the comparison, so that the binary search can be executed at a higher speed.
前記検索部は、前記第1記憶部に記憶された複数の基準データを3以上の範囲に分割したとき、前記基準データと比較すべき比較対象データがそれらの範囲のうちいずれに属するかを判定する判定回路を含んでもよい。前記判定回路は、前記範囲の境界の基準データと前記比較対象データとを比較する第3比較回路を複数含み、前記複数の第3比較回路により前記比較対象データが前記3以上の範囲のいずれに属するかを同時に並列して判定してもよい。バイナリサーチに先立って範囲を特定しておくことにより、検索速度を向上させることができる。前記第1記憶部の所定位置に記憶された前記基準データが、前記境界の基準データとして前記第3の比較回路に入力されてもよい。境界の基準データを自動的に設定可能とすることにより、第1記憶部の内容を変更しても、直ちに処理を開始させることができる。 When the search unit divides the plurality of reference data stored in the first storage unit into three or more ranges, the search unit determines which of the ranges the comparison target data to be compared with the reference data belongs to A determination circuit may be included. The determination circuit includes a plurality of third comparison circuits for comparing the reference data of the boundary of the range with the comparison target data, and the comparison target data is set to any one of the three or more ranges by the plurality of third comparison circuits. Whether they belong may be determined in parallel at the same time. By specifying the range prior to binary search, the search speed can be improved. The reference data stored at a predetermined position in the first storage unit may be input to the third comparison circuit as the reference data for the boundary. By making it possible to automatically set the boundary reference data, the processing can be started immediately even if the contents of the first storage unit are changed.
前記範囲は、前記通信データ中における前記基準データの出現頻度の分布に応じて設定されてもよい。これにより、検索効率をより向上させることができ、より高速な検索を実現することができる。 The range may be set according to a distribution of appearance frequencies of the reference data in the communication data. Thereby, the search efficiency can be further improved, and a higher-speed search can be realized.
前記第1記憶部は、前記通信データ中の比較対象データの位置を示す情報を更に記憶し、前記検索部は、前記位置を示す情報に基づいて前記比較対象データを抽出してもよい。これにより、比較対象データをより柔軟に設定することができ、検索効率を向上させることができる。 The first storage unit may further store information indicating a position of comparison target data in the communication data, and the search unit may extract the comparison target data based on the information indicating the position. Thereby, comparison object data can be set more flexibly and search efficiency can be improved.
前記第1記憶部又は前記第2記憶部は、外部から書き換え可能に設けられてもよい。これにより、基準データや処理内容などを可変に設定し、データ処理装置をさまざまなデータ処理に利用することができる。 The first storage unit or the second storage unit may be provided to be rewritable from the outside. Thereby, reference data, processing contents, etc. can be variably set, and the data processing apparatus can be used for various data processing.
前記検索部は、通信パケットの全てのデータの取得を待たずに、前記基準データと比較すべきデータを取得した時点で、そのデータと前記基準データの比較を開始してもよい。これにより、処理に要する時間を短縮することができる。検索部における比較処理に限らず、その他の処理についても同様に、全てのデータの取得を待たずに開始してもよい。 The retrieval unit may start comparing the reference data with the data when the data to be compared with the reference data is acquired without waiting for the acquisition of all data of the communication packet. Thereby, the time required for processing can be shortened. Not only the comparison process in the search unit but also other processes may be started without waiting for the acquisition of all data.
本発明の別の態様は、データ処理装置に関する。このデータ処理装置は、上述したいずれかのデータ処理装置を複数備え、それぞれの前記データ処理装置は、通信回線との間でデータを入出力するインタフェースを2つ備えており、それぞれの前記インタフェースの入力と出力を切り替えることにより、前記データを処理する方向を可変に制御されることを特徴とする。これにより、いずれかのデータ処理装置が動作できない状態になったときに、他のデータ処理装置を代替として動作させることができ、耐障害性を向上させることができる。また、いずれかのデータ処理装置をメンテナンスなどにより停止させるときにも、他のデータ処理装置を代替として動作させることができ、運用を停止せずにメンテナンスを行うことができる。さらに、トラフィックの状況などに応じて、それぞれのデータ処理装置が処理するデータの流れの方向を可変とすることにより、トラフィックの増減などに適切に対応することができる。 Another aspect of the present invention relates to a data processing apparatus. The data processing device includes a plurality of any of the data processing devices described above, and each of the data processing devices includes two interfaces for inputting / outputting data to / from a communication line. The direction of processing the data is variably controlled by switching between input and output. As a result, when one of the data processing devices becomes inoperable, another data processing device can be operated as an alternative, and fault tolerance can be improved. Also, when any one of the data processing devices is stopped due to maintenance or the like, the other data processing device can be operated as an alternative, and maintenance can be performed without stopping the operation. Furthermore, by changing the direction of the flow of data processed by each data processing device in accordance with the traffic conditions, it is possible to appropriately cope with traffic increase / decrease.
なお、以上の構成要素の任意の組合せ、本発明の表現を方法、装置、システム、記録媒体、コンピュータプログラムなどの間で変換したものもまた、本発明の態様として有効である。 It should be noted that any combination of the above-described constituent elements and a conversion of the expression of the present invention between a method, an apparatus, a system, a recording medium, a computer program, etc. are also effective as an aspect of the present invention.
本発明によれば、高速なデータ処理装置を実現する技術を提供することができる。 According to the present invention, a technique for realizing a high-speed data processing device can be provided.
図2は、本発明のデータ処理装置の一例である通信制御装置の構成を示す。本実施の形態の通信制御装置10は、図1に示した従来の通信制御装置1においてはCPU及びOSを含むソフトウェアにより実現されていたパケット処理部3に代えて、ワイヤードロジック回路による専用のハードウェアにより構成されたパケット処理回路20を備える。汎用処理回路であるCPUにおいて動作するOSとソフトウェアにより通信データを処理するのではなく、通信データを処理するための専用のハードウェア回路を設けることにより、CPUやOSなどに起因する性能の限界を克服し、処理能力の高い通信制御装置を実現することが可能となる。
FIG. 2 shows a configuration of a communication control apparatus which is an example of the data processing apparatus of the present invention. The
例えば、パケットフィルタリングなどを実行するために、パケットに含まれるデータに、フィルタリングの判断基準となる基準データが含まれるか否かを検索する場合に、CPUを用いて通信データと基準データを比較すると、一度に高々64ビットしか比較することができず、処理速度を向上させようとしてもCPUの性能で頭打ちになるという問題があった。CPUでは、通信データから64ビットをメモリへ読み上げ、基準データとの比較を行い、つづいて、次の64ビットをメモリへ読み上げる、という処理を何度も繰り返し行う必要があるので、メモリへの読み上げ時間が律速となり、処理速度に限界がある。 For example, when searching for whether or not the data included in the packet includes reference data that is a criterion for filtering in order to perform packet filtering or the like, the communication data and the reference data are compared using the CPU. However, only 64 bits can be compared at a time, and even if it is attempted to improve the processing speed, there is a problem that the performance of the CPU reaches a peak. In the CPU, it is necessary to repeat the process of reading 64 bits from the communication data into the memory, comparing with the reference data, and then reading the next 64 bits into the memory. Time is rate limiting and processing speed is limited.
それに対し、本実施の形態では、通信データと基準データとを比較するために、ワイヤードロジック回路により構成された専用のハードウェア回路を設ける。この回路は、64ビットよりも長いデータ長、例えば、1024ビットのデータ長の比較を可能とするために、並列に設けられた複数の比較器を含む。このように、専用のハードウェアを設けることにより、同時に並列して多数のビットマッチングを実行することができる。従来のCPUを用いた通信制御装置1では一度に64ビットしか処理できなかったところを、一度に1024ビットの処理を可能にすることで、飛躍的に処理速度を向上させることができる。比較器の数を多くすれば処理能力も向上するが、コストやサイズも増大するので、所望の処理性能と、コスト、サイズ、などを考慮して、最適なハードウェア回路を設計すればよい。
On the other hand, in the present embodiment, a dedicated hardware circuit configured by a wired logic circuit is provided to compare communication data and reference data. This circuit includes a plurality of comparators provided in parallel to enable comparison of data lengths longer than 64 bits, for example, a data length of 1024 bits. In this way, by providing dedicated hardware, a large number of bit matching operations can be executed in parallel at the same time. The
また、本実施の形態の通信制御装置10は、ワイヤードロジック回路による専用のハードウェアにより構成されるので、OS(Operating System)を必要としない。このため、OSのインストール、バグ対応、バージョンアップなどの作業が必要なく、管理やメンテナンスのためのコストや工数を低減させることができる。また、汎用的な機能が求められるCPUとは異なり、不必要な機能を包含していないので、余計なリソースを用いることがなく、低コスト化、回路面積の低減、処理速度の向上などが望める。さらに、OSを利用していた従来の通信制御装置とは異なり、余分な機能を有しないので、セキュリティホールなどが発生する可能性が低く、ネットワークを介した悪意ある第三者からの攻撃に対する耐性に優れている。
Further, since the
従来の通信制御装置1は、CPUとOSを前提としたソフトウェアによりパケットを処理しており、パケットの全てのデータを受信してからプロトコル処理を行い、データがアプリケーションに渡される。それに対して、本実施の形態の通信制御装置10では、専用のハードウェア回路により処理を行うので、パケットの全てのデータを受信してから処理を開始する必要はなく、処理に必要なデータを受信すれば、後続のデータの受信を待たずに、任意の時点で処理を開始することができる。例えば、後述する位置検出回路における位置検出処理は、比較対象データの位置を特定するための位置特定データを受信した時点で開始することができる。このように、全てのデータの受信を待たずに様々な処理をフローティングで実行することができるので、パケットのデータを処理するのに要する時間を短縮することができる。
The conventional
図3は、パケット処理回路の内部構成を示す。パケット処理回路20は、通信データに対して実行する処理の内容を決定するための基準となる基準データを記憶する第1データベース50と、受信された通信データの中に基準データが含まれているか否かを、通信データと基準データとを比較することにより検索する検索回路30と、検索回路30による検索結果と通信データに対して実行する処理の内容とを対応づけて記憶する第2データベース60と、検索回路30による検索結果と第2データベース60に記憶された条件とに基づいて通信データを処理する処理実行回路40とを含む。
FIG. 3 shows the internal configuration of the packet processing circuit. The
検索回路30は、通信データの中から基準データと比較すべき比較対象データの位置を検出する位置検出回路32と、第1データベース50に記憶された基準データを3以上の範囲に分割したとき、比較対象データがそれらの範囲のうちいずれに属するかを判定する判定回路の一例であるインデックス回路34と、判定された範囲の中で比較対象データと合致する基準データを検索するバイナリサーチ回路36とを含む。比較対象データを基準データの中から検索する方法としては、任意の検索技術を利用可能であるが、本実施の形態ではバイナリサーチ法を用いる。
When the
図4は、位置検出回路の内部構成を示す。位置検出回路32は、比較対象データの位置を特定するための位置特定データと通信データとを比較するための複数の比較回路33a〜33fを含む。ここでは、6個の比較回路33a〜33fが設けられているが、後述するように、比較回路の個数は任意でよい。それぞれの比較回路33a〜33fには、通信データが、所定のデータ長、例えば、1バイトずつずらして入力される。そして、これら複数の比較回路33a〜33fにおいて、同時に並列して、検出すべき位置特定データと通信データとの比較がなされる。
FIG. 4 shows the internal configuration of the position detection circuit. The
本実施の形態においては、通信制御装置10の動作を説明するための例として、通信データ中に含まれる「No. ###」という文字列を検出し、その文字列中に含まれる数字「###」を基準データと比較して、基準データに合致した場合はパケットの通過を許可し、合致しなかった場合はパケットを破棄する処理を行う場合について説明する。
In the present embodiment, as an example for explaining the operation of the
図4の例では、通信データの中から、数字「###」の位置を特定するための位置特定データ「No.」を検出するために、通信データ「01No. 361・・・」を、1文字ずつずらして比較回路33a〜33fに入力している。すなわち、比較回路33aには「01N」が、比較回路33bには「1No」が、比較回路33cには「No.」が、比較回路33dには「o. 」が、比較回路33eには「. 3」が、比較回路33fには「 36」が、それぞれ入力される。ここで、比較回路33a〜33fが同時に位置特定データ「No.」との比較を実行する。これにより、比較回路33cがマッチし、通信データの先頭から3文字目に「No.」という文字列が存在することが検出される。こうして、位置検出回路32により検出された位置特定データ「No.」の次に、比較対象データである数字のデータが存在することが検出される。
In the example of FIG. 4, in order to detect the position specifying data “No.” for specifying the position of the number “####” from the communication data, the communication data “01No. 361. Each character is shifted and input to the comparison circuits 33a to 33f. That is, the comparison circuit 33a has “01N”, the
CPUにより同様の処理を行うならば、まず、文字列「01N」を「No.」と比較し、続いて、文字列「1No」を「No.」と比較する、というように、先頭から順に1つずつ比較処理を実行する必要があるため、検出速度の向上は望めない。これに対し、本実施の形態の通信制御装置10では、複数の比較回路33a〜33fを並列に設けることにより、CPUではなしえなかった同時並列的な比較処理が可能となり、処理速度を格段に向上させることができる。比較回路は多ければ多いほど同時に比較可能な位置が多くなるので、検出速度も向上するが、コスト、サイズ、などを考慮の上、所望の検出速度を得られるのに十分な数の比較回路を設ければよい。
If similar processing is performed by the CPU, first, the character string “01N” is compared with “No.”, and then the character string “1No” is compared with “No.”. Since it is necessary to execute comparison processing one by one, improvement in detection speed cannot be expected. On the other hand, in the
位置検出回路32は、位置特定データを検出するためだけでなく、汎用的に文字列を検出する回路として利用されてもよい。また、文字列だけでなく、ビット単位で位置特定データを検出するように構成されてもよい。
The
図5は、第1データベースの内部データの例を示す。第1データベース50には、パケットのフィルタリング、ルーティング、スイッチング、置換などの処理の内容を決定するための基準となる基準データが、何らかのソート条件にしたがってソートされて格納されている。図5の例では、1000個の基準データが記憶されている。
FIG. 5 shows an example of internal data of the first database. In the
第1データベース50の先頭のレコードには、通信データ中の比較対象データの位置を示すオフセット51が格納されている。例えば、TCPパケットにおいては、パケット内のデータ構成がビット単位で定められているため、パケットの処理内容を決定するためのフラグ情報などの位置をオフセット51として設定しておけば、必要なビットのみを比較して処理内容を決定することができるので、処理効率を向上させることができる。また、パケットのデータ構成が変更された場合であっても、オフセット51を変更することで対応することができる。第1データベース50には、比較対象データのデータ長を格納しておいてもよい。これにより、必要な比較器のみを動作させて比較を行うことができるので、検索効率を向上させることができる。
In the first record of the
インデックス回路34は、第1データベース50に格納されている基準データを3以上の範囲52a〜52dに分割したとき、比較対象データがそれらの範囲のうちいずれに属するかを判定する。図5の例では、1000個の基準データは、250個ずつ4つの範囲52a〜52dに分割されている。インデックス回路34は、範囲の境界の基準データと比較対象データとを比較する複数の比較回路35a〜35cを含む。比較回路35a〜35cにより比較対象データと境界の基準データとを同時に並列して比較することにより、比較対象データがいずれの範囲に属するかを1度の比較処理で判定することができる。
When the reference data stored in the
インデックス回路34の比較回路35a〜35cに入力される境界の基準データは、通信制御装置10の外部に設けられた装置により設定されてもよいし、予め第1データベース50の所定位置の基準データが自動的に入力されるようにしてもよい。後者の場合、第1データベース50を更新しても、自動的に第1データベース50の所定位置の基準データが比較回路35a〜35cに入力されるので、初期設定などを必要とせず、直ちに通信制御処理を実行させることができる。
The boundary reference data input to the
前述したように、CPUによりバイナリサーチを実行する場合は、同時に複数の比較を実行することができないが、本実施の形態の通信制御装置10では、複数の比較回路35a〜35cを並列に設けることにより、同時並列的な比較処理を可能とし、検索速度を格段に向上させることができる。
As described above, when a binary search is executed by the CPU, a plurality of comparisons cannot be executed at the same time. However, in the
インデックス回路34により範囲が判定されると、バイナリサーチ回路36がバイナリサーチ法により検索を実行する。バイナリサーチ回路36は、インデックス回路34により判定された範囲をさらに2分割し、その境界位置にある基準データと比較対象データとを比較することにより、いずれの範囲に属するかを判定する。バイナリサーチ回路36は、基準データと比較対象データとをビット単位で比較する比較回路を複数個、例えば本実施の形態では1024個含んでおり、1024ビットのビットマッチングを同時に実行する。2分割された範囲のいずれに属するかが判定されると、さらに、その範囲を2分割して境界位置にある基準データを読み出し、比較対象データと比較する。以降、この処理を繰り返すことにより範囲をさらに限定し、最終的に比較対象データと合致する基準データを検索する。
When the range is determined by the
前述した例を用いてさらに詳細に動作を説明する。図4に示した通信データにおいて、位置特定データ「No.」につづく比較対象データは「361」という数字である。位置特定データ「No.」と比較対象データ「361」との間には1文字分のスペースが存在しているので、このスペースを比較対象データから除くために、オフセット51が「8」ビットに設定されている。バイナリサーチ回路36は、位置特定データ「No.」につづく通信データから、「8」ビット、すなわち1バイト分をスキップし、さらにつづく「361」を比較対象データとして読み込む。
The operation will be described in more detail using the example described above. In the communication data shown in FIG. 4, the comparison target data following the position specifying data “No.” is the number “361”. Since there is a space for one character between the position specifying data “No.” and the comparison target data “361”, the offset 51 is set to “8” bits in order to remove this space from the comparison target data. Is set. The
インデックス回路34の比較回路35a〜35cには、比較対象データとして「361」が入力され、基準データとして、比較回路35aには、範囲52aと52bの境界にある基準データ「378」が、比較回路35bには、範囲52bと52cの境界にある基準データ「704」が、比較回路35cには、範囲52cと52dの境界にある基準データ「937」が、それぞれ入力される。比較回路35a〜35cにより同時に比較が行われ、比較対象データ「361」が範囲52aに属することが判定される。以降、バイナリサーチ回路36が基準データの中に比較対象データ「361」が存在するか否かを検索する。
“361” is input as comparison target data to the
図6は、第1データベースの内部データの別の例を示す。図6に示した例では、基準データのデータ数が、第1データベース50に保持可能なデータ数、ここでは1000個よりも少ない。このとき、第1データベース50には、最終データ位置から降順に基準データが格納される。そして、残りのデータには0が格納される。データベースのローディング方法として、先頭からデータを配置せずにローディングエリアの後方から配置し、ローディングエリア先頭に空きが生じた場合は全ての空きをゼロサプレスすることで、データーベースは常にフルの状態になり、バイナリー検索する場合の最大時間を一定にすることができる。また、バイナリサーチ回路36は、検索中に基準データとして「0」を読み込んだときには、比較結果が自明であるから、比較を行わずに範囲を特定して、次の比較にうつることができる。これにより、検索速度を向上させることができる。
FIG. 6 shows another example of internal data of the first database. In the example shown in FIG. 6, the number of reference data is less than the number of data that can be held in the
CPUによるソフトウェア処理においては、第1データベース50に基準データを格納する際に、最初のデータ位置から昇順に基準データが格納される。残りのデータには、例えば最大値が格納されることになるが、この場合、バイナリサーチにおいて、上述したような比較処理の省略はできない。上述した比較技術は、専用のハードウェア回路により検索回路30を構成したことにより実現される。
In the software processing by the CPU, when the reference data is stored in the
図7は、第1データベースの内部データのさらに別の例を示す。図7に示した例では、基準データを均等に3以上の範囲に分割するのではなく、範囲52aは500個、範囲52bは100個というように、範囲に属する基準データの数が不均一になっている。これらの範囲は、通信データ中における基準データの出現頻度の分布に応じて設定されてもよい。すなわち、それぞれの範囲に属する基準データの出現頻度の和がほぼ同じになるように範囲が設定されてもよい。これにより、検索効率を向上させることができる。インデックス回路34の比較回路35a〜35cに入力される基準データは、外部から変更可能になっていてもよい。これにより、範囲を動的に設定することができ、検索効率を最適化することができる。
FIG. 7 shows still another example of the internal data of the first database. In the example shown in FIG. 7, the reference data is not equally divided into three or more ranges, but the number of reference data belonging to the range is uneven, such as 500 for the
図8は、バイナリサーチ回路に含まれる比較回路の構成を示す。前述したように、バイナリサーチ回路36は、1024個の比較回路36a、36b、・・・、を含む。それぞれの比較回路36a、36b、・・・、には、基準データ54と比較対象データ56が1ビットずつ入力され、それらの大小が比較される。インデックス回路34の各比較回路35a〜35cの内部構成も同様である。このように、専用のハードウェア回路で比較処理を実行することにより、多数の比較回路を並列して動作させ、多数のビットを同時に比較することができるので、比較処理を高速化することができる。
FIG. 8 shows a configuration of a comparison circuit included in the binary search circuit. As described above, the
図9は、第2データベースの内部データの例を示す。第2データベース60は、検索回路30による検索結果を格納する検索結果欄62と、通信データに対して実行する処理の内容を格納する処理内容欄64とを含み、検索結果と処理内容とを対応づけて保持する。図9の例では、通信データに基準データが含まれている場合は、そのパケットの通過を許可し、含まれていない場合は、そのパケットを破棄するという条件が設定されている。処理実行回路40は、検索結果に基づいて第2データベース60から処理内容を検索し、通信データに対して処理を実行する。処理実行回路40も、ワイヤードロジック回路により実現されてもよい。
FIG. 9 shows an example of internal data of the second database. The
図10は、第2データベースの内部データの別の例を示す。図10の例では、基準データごとに、処理内容が設定されている。パケットの置換を行う場合、置換先のデータを第2データベース60に格納しておいてもよい。パケットのルーティングやスイッチングを行う場合、経路に関する情報を第2データベース60に格納しておいてもよい。処理実行回路40は、検索回路30による検索結果に応じて、第2データベース60に格納された、フィルタリング、ルーティング、スイッチング、置換などの処理を実行する。図10のように、基準データごとに処理内容を設定する場合、第1データベース50と第2データベース60とを統合してもよい。
FIG. 10 shows another example of internal data of the second database. In the example of FIG. 10, the processing content is set for each reference data. When packet replacement is performed, replacement destination data may be stored in the
第1のデータベース及び第2のデータベースは、外部から書き換え可能に設けられる。これらのデータベースを入れ替えることにより、同じ通信制御装置10を用いて、さまざまなデータ処理や通信制御を実現することができる。また、検索対象となる基準データを格納したデータベースを2以上設けて、多段階の検索処理を行ってもよい。このとき、検索結果と処理内容とを対応づけて格納したデータベースを2以上設けて、より複雑な条件分岐を実現してもよい。このように、データベースを複数設けて多段階の検索を行う場合に、位置検出回路32、インデックス回路34、バイナリサーチ回路36などを複数設けてもよい。
The first database and the second database are provided so as to be rewritable from the outside. By exchanging these databases, various data processing and communication control can be realized using the same
上述した比較に用いられるデータは、同じ圧縮ロジックにより圧縮されてもよい。比較に際して、比較元のデータと比較先のデータが同じ方式で圧縮されていれば、通常と同様の比較が可能である。これにより、比較の際にローディングするデータ量を低減することができる。ローディングするデータ量が少なくなれば、メモリからデータを読み出すのに要する時間が短縮されるので、全体の処理時間も短縮することができる。また、比較器の量を削減することができるので、装置の小型化、軽量化、低コスト化に寄与することができる。比較に用いられるデータは、圧縮された形式で格納されていてもよいし、メモリから読み出した後、比較の前に圧縮されてもよい。 The data used for the comparison described above may be compressed by the same compression logic. In comparison, if the comparison source data and the comparison destination data are compressed by the same method, the same comparison as usual is possible. As a result, the amount of data loaded at the time of comparison can be reduced. If the amount of data to be loaded is reduced, the time required to read data from the memory is reduced, so that the overall processing time can also be reduced. Further, since the amount of the comparator can be reduced, it is possible to contribute to downsizing, weight reduction, and cost reduction of the apparatus. The data used for the comparison may be stored in a compressed form, or may be compressed after being read from the memory and before the comparison.
図11は、本実施の形態の通信制御装置の別の構成例を示す。本図に示した通信制御装置10は、図2に示した通信制御装置10と同様の構成を備える通信制御ユニット12を2つ有している。また、それぞれの通信制御ユニット12の動作を制御する切替制御部14が設けられている。それぞれの通信制御ユニット12は、2つの入出力インタフェース16を有しており、それぞれの入出力インタフェース16を介して、上流側、下流側の2つのネットワークに接続されている。通信制御ユニット12は、いずれか一方のネットワークから通信データを入力し、処理したデータを他方のネットワークに出力する。切替制御部14は、それぞれの通信制御ユニット12に設けられた入出力インタフェース16の入出力を切り替えることにより、通信制御ユニット12における通信データの流れの方向を切り替える。これにより、一方向だけではなく、双方向の通信制御が可能となる。
FIG. 11 shows another configuration example of the communication control apparatus according to the present embodiment. The
切替制御部14は、通信制御ユニット12の一方がインバウンド、他方がアウトバウンドのパケットを処理するように制御してもよいし、双方がインバウンドのパケットを処理するように制御してもよいし、双方がアウトバウンドのパケットを処理するように制御してもよい。これにより、例えばトラフィックの状況や目的などに応じて、制御する通信の方向を可変とすることができる。
The switching
切替制御部14は、各通信制御ユニット12の動作状況を取得し、その動作状況に応じて通信制御の方向を切り替えてもよい。例えば、一方の通信制御ユニット12を待機状態として、他方の通信制御ユニット12を動作させている場合に、その通信制御ユニット12が故障などにより停止したことを検知したときに、代替として待機中の通信制御ユニット12を動作させてもよい。これにより、通信制御装置10のフォールトトレランスを向上させることができる。また、一方の通信制御ユニット12に対して、データベースの更新などのメンテナンスを行うときに、他方の通信制御ユニット12を代替として動作させてもよい。これにより、通信制御装置10の運用を停止させずに、適切にメンテナンスを行うことができる。
The switching
通信制御装置10に3以上の通信制御ユニット12が設けられてもよい。切替制御部14は、例えば、トラフィックの状況を取得して、通信量の多い方向の通信制御処理に、より多くの通信制御ユニット12を割り当てるように、各通信制御ユニット12の通信の方向を制御してもよい。これにより、ある方向の通信量が増加しても、通信速度の低下を最小限に抑えることができる。
Three or more communication control units 12 may be provided in the
なお、複数の通信制御ユニット12の間で、通信制御部2又は4の一部が共用されてもよい。また、パケット処理回路20の一部が共用されてもよい。
A part of the
以上、本発明を実施の形態をもとに説明した。この実施の形態は例示であり、それらの各構成要素や各処理プロセスの組合せにいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。 The present invention has been described based on the embodiments. This embodiment is an exemplification, and it will be understood by those skilled in the art that various modifications can be made to combinations of the respective constituent elements and processing processes, and such modifications are also within the scope of the present invention. is there.
10 通信制御装置、12 通信制御ユニット、14 切替制御部、20 パケット処理回路、30 検索回路、32 位置検出回路、33 比較回路、34 インデックス回路、35 比較回路、36 バイナリサーチ回路、40 処理実行回路、50 第1データベース、60 第2データベース。
DESCRIPTION OF
Claims (4)
前記データの中に前記基準データが含まれているか否かを、前記データと前記基準データとを比較することにより検索する検索部と、
前記検索部による検索結果と前記処理の内容とを対応づけて記憶する第2記憶部と、
前記検索結果に基づいて、前記検索結果に対応づけられた処理を前記データに対して実行する処理部と、を含み、
前記検索部は、ワイヤードロジック回路により構成され、
前記検索部は、検索を実行する前に、前記第1記憶部に記憶された複数の基準データを3以上の範囲に分割したとき、前記基準データと比較すべき比較対象データがそれらの範囲のうちいずれに属するかを判定する判定回路を含むことを特徴とするデータ処理装置。 A first storage unit that stores reference data serving as a reference for determining the content of processing to be performed on the acquired data;
A search unit for searching whether or not the reference data is included in the data by comparing the data and the reference data;
A second storage unit that stores the search result by the search unit and the content of the process in association with each other;
A processing unit that executes processing associated with the search result for the data based on the search result,
The search unit includes a wired logic circuit,
When the search unit divides the plurality of reference data stored in the first storage unit into three or more ranges before executing the search, the comparison target data to be compared with the reference data is within the range. A data processing apparatus comprising a determination circuit for determining which one of them belongs.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007234536A JP4060348B2 (en) | 2005-02-18 | 2007-09-10 | Data processing device |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2005042755 | 2005-02-18 | ||
| JP2007234536A JP4060348B2 (en) | 2005-02-18 | 2007-09-10 | Data processing device |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2007503569A Division JP4027416B2 (en) | 2005-02-18 | 2005-07-07 | Data processing device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2008022577A JP2008022577A (en) | 2008-01-31 |
| JP4060348B2 true JP4060348B2 (en) | 2008-03-12 |
Family
ID=39078140
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2007234536A Expired - Fee Related JP4060348B2 (en) | 2005-02-18 | 2007-09-10 | Data processing device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4060348B2 (en) |
-
2007
- 2007-09-10 JP JP2007234536A patent/JP4060348B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2008022577A (en) | 2008-01-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4027416B2 (en) | Data processing device | |
| JP4554675B2 (en) | Communication control device and communication control system | |
| US8290934B2 (en) | Method and system for processing access control lists using a hashing scheme | |
| US8750144B1 (en) | System and method for reducing required memory updates | |
| US8990492B1 (en) | Increasing capacity in router forwarding tables | |
| JP4087427B2 (en) | Data processing system | |
| JP4201822B2 (en) | Data processing device | |
| JP4571184B2 (en) | Communication management system | |
| JP4060348B2 (en) | Data processing device | |
| JPWO2009066340A1 (en) | Determination apparatus and determination method | |
| JP3993885B1 (en) | Binary search circuit and method | |
| JPWO2008023424A1 (en) | Communication management system | |
| JP4104649B1 (en) | Binary search circuit and method | |
| JP4101283B1 (en) | Test equipment | |
| JPWO2008075426A1 (en) | Communication control device and communication control method | |
| KR20080045761A (en) | Binary Search Circuits and Methods | |
| JP4638513B2 (en) | Communication control device and communication control method | |
| JP4676530B2 (en) | Communication control device | |
| CN118646723A (en) | A flow table unloading method, system, device and medium suitable for smart network card | |
| JPWO2009066341A1 (en) | Detection circuit and detection method | |
| JPWO2009069179A1 (en) | Test apparatus and test method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20071106 |
|
| 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: 20071204 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20071219 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101228 Year of fee payment: 3 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| S303 | Written request for registration of pledge or change of pledge |
Free format text: JAPANESE INTERMEDIATE CODE: R316303 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101228 Year of fee payment: 3 |
|
| R371 | Transfer withdrawn |
Free format text: JAPANESE INTERMEDIATE CODE: R371 |
|
| S303 | Written request for registration of pledge or change of pledge |
Free format text: JAPANESE INTERMEDIATE CODE: R316303 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101228 Year of fee payment: 3 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101228 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101228 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101228 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101228 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101228 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101228 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101228 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111228 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111228 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111228 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121228 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121228 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131228 Year of fee payment: 6 |
|
| S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
| R360 | Written notification for declining of transfer of rights |
Free format text: JAPANESE INTERMEDIATE CODE: R360 |
|
| R360 | Written notification for declining of transfer of rights |
Free format text: JAPANESE INTERMEDIATE CODE: R360 |
|
| R370 | Written measure of declining of transfer procedure |
Free format text: JAPANESE INTERMEDIATE CODE: R370 |
|
| S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| LAPS | Cancellation because of no payment of annual fees |