JP2002335275A - Packet processing device - Google Patents
Packet processing deviceInfo
- Publication number
- JP2002335275A JP2002335275A JP2001138243A JP2001138243A JP2002335275A JP 2002335275 A JP2002335275 A JP 2002335275A JP 2001138243 A JP2001138243 A JP 2001138243A JP 2001138243 A JP2001138243 A JP 2001138243A JP 2002335275 A JP2002335275 A JP 2002335275A
- Authority
- JP
- Japan
- Prior art keywords
- packet
- processor
- processing
- data
- ram
- 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.)
- Withdrawn
Links
Landscapes
- Communication Control (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Small-Scale Networks (AREA)
Abstract
(57)【要約】
【課題】 本発明はパケット処理装置に関し、パケット
処理の高速化が可能なパケット処理装置を提供すること
を目的としている。
【解決手段】 入力パケットに対し、予めパターンマッ
チングロジック10を用いてパケットの判別を行ない、
パケット処理プロセッサ20が該パケット判別情報に従
い、該パケット処理プロセッサ20の内部状態を命令を
駆動せずに切り替えることによってパケット判別情報に
従った所望のプログラムを動作させるように構成する。
(57) Abstract: The present invention relates to a packet processing device, and an object of the present invention is to provide a packet processing device capable of speeding up packet processing. SOLUTION: A packet is discriminated from an input packet using a pattern matching logic 10 in advance,
The packet processor 20 switches the internal state of the packet processor 20 without driving an instruction in accordance with the packet identification information, thereby operating a desired program according to the packet identification information.
Description
【0001】[0001]
【発明の属する技術分野】本発明はパケット処理装置に
関する。コンピュータやさまざまな情報処理機器をネッ
トワークにより相互接続するシステムの利用拡大に伴
い、ネットワークの規模拡大或いは相互接続のために、
ネットワーク間の中継、例えばLAN(ローカルエリア
ネットワーク)とLAN、LANと専用線を相互接続す
る必要性が生じる。このようにして構築されるネットワ
ークで現在主流なのはIP(インターネット・プロトコ
ル)によるネットワークである。The present invention relates to a packet processing device. With the expansion of the use of systems that interconnect computers and various information processing devices via networks, network expansion or interconnection
There arises a need for interconnecting networks, for example, interconnecting LANs (local area networks) with LANs, and LANs with dedicated lines. Currently, the mainstream of networks constructed in this way is a network based on IP (Internet Protocol).
【0002】IPはISO(Internationa
l Organization for Standa
rdization)のOSI(Open Syste
mInterconnection)モデルにおけるネ
ットワーク層に相当するコネクションレス型のプロトコ
ルである。予め端末間で通信路を確保するコネクション
型のプロトコルと異なり、コネクションレス型のIP通
信では、LAN間を相互接続するパケット中継装置が、
通信データが格納されているパケットをそのパケットの
IPヘッダに格納されている情報に基づいて中継処理す
ることによって端末間の通信が実現する。[0002] IP stands for ISO (Internationa
l Organization for Standa
OSI (Open System)
This is a connectionless protocol corresponding to a network layer in an (mInterconnection) model. Unlike a connection-type protocol that secures a communication path between terminals in advance, in connectionless-type IP communication, a packet relay device that interconnects LANs requires:
By performing relay processing on a packet storing communication data based on information stored in the IP header of the packet, communication between terminals is realized.
【0003】従って、IPネットワークにおけるパケッ
ト中継処理は、宛先テーブルの検索やヘッダ書き替え処
理といったパケット処理が必要になる。本発明は、上述
のように、端末と中継装置が相互接続された通信網にお
けるパケット中継装置において、宛先テーブルの検索や
ヘッダ書き替え処理等のパケット処理を行なうパケット
処理システムに関するものである。Therefore, packet relay processing in an IP network requires packet processing such as destination table search and header rewriting processing. The present invention relates to a packet processing system that performs packet processing such as destination table search and header rewriting processing in a packet relay device in a communication network in which terminals and relay devices are interconnected as described above.
【0004】[0004]
【従来の技術】IPネットワークによるパケット処理
は、パケット中継装置が、受信パケットのパケットフォ
ーマットをパケットのヘッダ情報等から判別し、各パケ
ットフォーマットに応じて、パケットヘッダのチェック
サムの計算、宛先テーブルの検索、パケットヘッダの書
き替え等のパケットを中継するのに必要な処理を、パケ
ットに対して行なうことによって実現するものである。2. Description of the Related Art In packet processing by an IP network, a packet relay apparatus determines a packet format of a received packet from header information of the packet, calculates a checksum of a packet header according to each packet format, and checks a destination table. The processing required for relaying a packet, such as a search and rewriting of a packet header, is realized by performing processing on the packet.
【0005】更に、一般的にパケット中継装置は、上述
のパケットを中継するのに必要な処理に加え、ネットワ
ークにおけるある特定の通信を制限するパケットフィル
タリングの実装が求められ、このパケットフィルタリン
グ処理の際には、特定の宛先アドレスを有するパケット
の中継を制限する等のパケットフィルタリング条件に適
合するパケットを識別するために、パケットフォーマッ
トに応じたパケット判別処理が必要である。Further, in general, a packet relay apparatus is required to implement packet filtering for restricting a specific communication in a network in addition to the processing required for relaying the above-described packet. In order to identify a packet that satisfies packet filtering conditions such as limiting the relay of a packet having a specific destination address, packet discrimination processing according to the packet format is required.
【0006】上述のパケット判別処理を含むパケット処
理に関し、装置完成後のプロトコル自体の改訂に伴う処
理手順の変更に耐えうるパケット処理システムを構築す
る場合、従来、パケット処理をプロセッサによってソフ
トウェア処理するのが一般的である。[0006] Regarding the packet processing including the above-described packet discrimination processing, when constructing a packet processing system that can withstand a change in the processing procedure accompanying the revision of the protocol itself after the completion of the apparatus, conventionally, the packet processing is performed by software using a processor. Is common.
【0007】ところで、パケット処理の傾向として、パ
ケット受信時点におけるはじめのパケット判別処理は、
パケット判別するための、ある特定のパケット内フィー
ルドに対する比較パターン数が多い割には、各個別の比
較処理の依存関係は弱い。一方、一度上述の比較パター
ン数が多い比較処理を実施した後のパケット処理は、各
パケット判別処理間の依存関係が複雑であり、該比較処
理の結果を受けて、該当パケットに対して対応する演算
処理や書き替え処理を実行する傾向がある。By the way, as a tendency of packet processing, the first packet discriminating process at the time of packet reception is as follows.
Despite the large number of comparison patterns for a particular field in a packet for packet discrimination, the dependence of each individual comparison process is weak. On the other hand, in the packet processing after the above-described comparison processing with a large number of comparison patterns is once performed, the dependency between the respective packet discrimination processings is complicated. There is a tendency to perform arithmetic processing and rewriting processing.
【0008】上述のパケット処理の傾向に対して、プロ
セッサによるパケット処理は、逐次順次処理であるプロ
グラム制御であるという性格上、比較パターン数が多
く、比較処理自体は、比較処理間の依存関係という点で
単純な場合、専用ハードウェアによる比較処理回路と比
べて、特に多大な命令ステップ数、即ち処理時間を必要
とする。In contrast to the above-described tendency of packet processing, the packet processing by the processor is a program control which is a sequential processing, so that the number of comparison patterns is large, and the comparison processing itself is called a dependency between the comparison processings. In a simple case, the number of instruction steps, that is, the processing time is particularly large as compared with the comparison processing circuit using dedicated hardware.
【0009】また、プロセッサによるパケット処理は、
専用ハードウェアによるパケット処理と比べてプロトコ
ル自体の改訂や、パケット中継装置が提供する通信サー
ビスの追加等に耐えうる高い柔軟性が利点であるが、上
述のパケット受信時におけるパケット判別処理は、固定
的な処理内容が多く、上述の高い柔軟性という利点を発
揮する可能性が低い。The packet processing by the processor is as follows:
Compared to packet processing by dedicated hardware, it has the advantage of high flexibility that can withstand revisions of the protocol itself and addition of communication services provided by the packet relay device, but the above-described packet discrimination processing at the time of packet reception is fixed. There are many specific processing contents, and it is unlikely that the above-mentioned advantage of high flexibility is exhibited.
【0010】従って、上述のパケット中継装置における
パケット処理の傾向及びプロセッサによるパケット処理
の必要命令ステップ数の傾向、及び専用ハードウェアに
よる比較処理回路の傾向から、従来、パケット処理をプ
ロセッサによってソフトウェア処理する際、プロセッサ
が実行する命令ステップ数を削減するため、パケット中
継装置は、図8に示すように、受信パケット1に対し、
同図中のプロセッサ20によるパケット処理を行なう前
に、専用ハードウェアによる比較処理回路(以下、パタ
ーンマッチングロジックという)10によって、受信パ
ケットをある程度判別し、受信パケット1及び受信パケ
ット1に付随する判別情報1aをパターンマッチングロ
ジック10からプロセッサ20へ伝達し、プロセッサ2
0によって、以後の高い柔軟性が要求されるパケット処
理を実行することによって、プロセッサが実行する命令
ステップ数を削減しつつ、効率的にパケット処理を実行
する。Therefore, conventionally, packet processing is performed by software using a processor based on the above-described tendency of packet processing in the packet relay apparatus, the tendency of the number of instruction steps required for packet processing by the processor, and the tendency of comparison processing circuits using dedicated hardware. At this time, in order to reduce the number of instruction steps executed by the processor, as shown in FIG.
Before the packet processing by the processor 20 in FIG. 2 is performed, the received packet is determined to some extent by the comparison processing circuit (hereinafter, referred to as pattern matching logic) 10 using dedicated hardware, and the received packet 1 and the determination accompanying the received packet 1 are determined. The information 1a is transmitted from the pattern matching logic 10 to the processor 20, and the
By performing 0, packet processing that requires high flexibility thereafter is executed, thereby efficiently executing packet processing while reducing the number of instruction steps executed by the processor.
【0011】図8は従来のプロセッサを用いたパケット
処理の構成を示す図である。図において、10はパケッ
ト1を受けて比較処理を行なうパターンマッチングロジ
ックである。プロセッサ20において、11はバス2と
接続される汎用インタフェース、12は制御部で、命令
デコーダ12aとプログラム・カウンタ12bより構成
されている。13は汎用レジスタ、14は演算器、15
は該演算器14と接続される外部バスバッファ、16は
演算器14と接続されるフラグ・レジスタである。FIG. 8 is a diagram showing a configuration of packet processing using a conventional processor. In the figure, reference numeral 10 denotes a pattern matching logic for receiving a packet 1 and performing a comparison process. In the processor 20, reference numeral 11 denotes a general-purpose interface connected to the bus 2, and reference numeral 12 denotes a control unit, which comprises an instruction decoder 12a and a program counter 12b. 13 is a general-purpose register, 14 is a computing unit, 15
Is an external bus buffer connected to the arithmetic unit 14, and 16 is a flag register connected to the arithmetic unit 14.
【0012】プロセッサ20の構成は、通常のプロセッ
サの構成と同じである。外部バスバッファ15は双方向
バッファであり、フラグ・レジスタ16は、演算器14
による演算結果をレジスタに入れ、結果に対してステー
タスを出すものである。パケット1は、汎用インタフェ
ース11を介して汎用レジスタ13に入力され、演算器
14により、演算が行われ、その結果が反映されたもの
が、再度バス2に戻され、パケット1として出ていく。The configuration of the processor 20 is the same as that of a normal processor. The external bus buffer 15 is a bidirectional buffer, and the flag register 16
Is put into a register, and a status is issued for the result. The packet 1 is input to the general-purpose register 13 via the general-purpose interface 11, is operated by the arithmetic unit 14, and a result reflecting the result is returned to the bus 2 again and exits as the packet 1.
【0013】[0013]
【発明が解決しようとする課題】しかしながら、図8で
示した従来の構成においては、パケット中継装置におい
て、パターンマッチングロジック10が出力したパケッ
ト判別情報1aを、プロセッサ20は汎用インタフェー
ス11を介してレジスタアクセス命令、又はメモリアク
セス命令等の該プロセッサ20のアーキテクチャに即し
た命令を発行することによって、該パケット判別情報に
アクセスして、該パケット判別情報に従ってその後のパ
ケット処理を実行する。故に、該プロセッサ20がパケ
ット判別情報にアクセスするために、命令ステップ数を
消費するという問題がある。However, in the conventional configuration shown in FIG. 8, in the packet relay device, the processor 20 registers the packet discrimination information 1a output from the pattern matching logic 10 through the general-purpose interface 11 in the register. By issuing an instruction conforming to the architecture of the processor 20, such as an access instruction or a memory access instruction, the processor accesses the packet identification information and executes subsequent packet processing according to the packet identification information. Therefore, there is a problem that the processor 20 consumes the number of instruction steps to access the packet identification information.
【0014】ヘッダチェックサムの計算というようなパ
ケット処理と直接関係がある処理とは違い、パケット処
理とは直接関係がない処理をプロセッサ20が命令で実
行することは、パケット中継装置が目標とするパケット
処理のスループットより、プロセッサ20が1つのパケ
ットに対して実行可能な処理時間が限られている場合、
プロセッサ20が実行可能なパケット処理内容の低下、
即ちパケット中継装置の柔軟性の低下を招く。また、別
の見方では、パケット処理とは直接関係がない処理をプ
ロセッサ20が命令で実行することは、同一のパケット
処理内容をプロセッサ20が実行するのにより多くの処
理時間を必要とし、パケット処理の高速化ができない原
因となる。Unlike the processing directly related to the packet processing, such as the calculation of the header checksum, it is the packet relay apparatus that the processor 20 executes the processing not directly related to the packet processing by the instruction. When the processing time that the processor 20 can execute on one packet is limited by the throughput of the packet processing,
Lowering of packet processing contents executable by the processor 20;
That is, the flexibility of the packet relay device is reduced. From another point of view, if the processor 20 executes a process that is not directly related to the packet processing by an instruction, the processor 20 needs more processing time to execute the same packet processing content, It is a cause that cannot be speeded up.
【0015】本発明はこのような課題に鑑みてなされた
ものであってパケット処理の高速化が可能なパケット処
理装置を提供することを目的としている。The present invention has been made in view of the above problems, and has as its object to provide a packet processing device capable of speeding up packet processing.
【0016】[0016]
【課題を解決するための手段】(1)図1は本発明の原
理ブロック図である。図8と同一のものは、同一の符号
を付して示す。図8に示す従来構成と異なる点は、パタ
ーンマッチングロジック10からパケット到着信号線3
を介してパケット到着信号が、プログラムバンク値信号
線4を介してプログラムバンク値がそれぞれプロセッサ
20内の制御部12に直に入力されている点である。そ
の他の構成は、図8と同じである。なお、図中、実線は
プロセッサ内データ線、破線はプロセッサ内制御線であ
る。(1) FIG. 1 is a block diagram showing the principle of the present invention. 8 are denoted by the same reference numerals. 8 differs from the conventional configuration shown in FIG.
, And the program bank value is directly input to the control unit 12 in the processor 20 via the program bank value signal line 4. Other configurations are the same as those in FIG. In the figure, a solid line is a data line in the processor, and a broken line is a control line in the processor.
【0017】本発明では、命令ステップ数を消費すると
いう問題点を解決するため、図1に示すように、パター
ンマッチングロジック10のパケット判別情報に関する
出力をプロセッサ20内の制御部12へ直接入力してい
る。そして、プロセッサ20が演算器14によって命令
を実行することなく、該パケット判別情報に従って該プ
ロセッサ20の内部状態を変化させるようにする。これ
により、命令ステップ数を消費せずに該パケット判別情
報に従ったパケット処理を実現している。In the present invention, in order to solve the problem of consuming the number of instruction steps, as shown in FIG. 1, an output relating to packet discrimination information of the pattern matching logic 10 is directly input to the control unit 12 in the processor 20. ing. Then, the processor 20 changes the internal state of the processor 20 according to the packet discrimination information without executing the instruction by the arithmetic unit 14. This realizes packet processing according to the packet discrimination information without consuming the number of instruction steps.
【0018】ここで、プロセッサ20の内部状態とは、
例えばプロセッサ20がプロセッサへのパケットの到着
をトリガに実行するプログラムを格納するメモリのバン
ク値を示すプログラムバンク値である。パケット中継装
置が、パケット判別情報に応じて実行するパケット処理
を行なう各プログラムをそれぞれのプログラムバンクへ
装置設計者が予め格納しておき、パターンマッチングロ
ジック10は、パケット判別結果に従って、予め装置設
計者が定めた対応するプログラムバンク値を出力する。Here, the internal state of the processor 20 is as follows.
For example, it is a program bank value indicating a bank value of a memory that stores a program executed by the processor 20 when a packet arrives at the processor as a trigger. The apparatus designer stores in advance in the respective program banks each program for performing packet processing executed by the packet relay apparatus according to the packet identification information, and the pattern matching logic 10 determines in advance the apparatus designer according to the packet identification result. And outputs the corresponding program bank value determined by.
【0019】プロセッサ20は、命令によるアクセス処
理が発生するような汎用インタフェースではなく、プロ
グラムバンク値信号線4からプログラムバンク値を受信
し、プロセッサ20内の制御部12が受信パケットに対
して実行するプログラムバンク値を切り替える。The processor 20 receives a program bank value from the program bank value signal line 4 instead of a general-purpose interface in which access processing by an instruction occurs, and the control unit 12 in the processor 20 executes the received packet. Switches the program bank value.
【0020】上述のパケット判別結果に従って、予め装
置設計者が対応するプログラムバンク値を設定する方法
としては、例えば受信パケットがIPのトランスポート
層プロトコルの一種であるTCP(Transmiss
ion Control Protocol)であるこ
とを、パターンマッチングロジック10が該受信パケッ
トのヘッダ情報より判別し、その判別結果に対して、パ
ターンマッチングロジック10が出力するプログラムバ
ンク値をパターンマッチングロジック10が用意したレ
ジスタへ装置設計者が装置起動時に設定しておく方法が
ある。As a method of setting the corresponding program bank value in advance by the device designer in accordance with the above-mentioned packet discrimination result, for example, a received packet is transmitted by TCP (Transmission) which is a kind of IP transport layer protocol.
pattern control logic), the pattern matching logic 10 determines from the header information of the received packet, the program bank value output by the pattern matching logic 10 in response to the determination result. There is a method that the device designer sets at the time of device startup.
【0021】このように構成すれば、プロセッサがパケ
ットデータを受信し、その内部状態を命令を駆動せずに
切り替えることによって、命令ステップ数を消費せずに
パケット判別情報に従った、所望のプログラムを動作さ
せることができる。これにより、同等の柔軟性を持つパ
ケット処理をより高速に行なうことが可能となる。With this configuration, the processor receives the packet data and switches its internal state without driving the instruction, so that the desired program according to the packet discrimination information without consuming the number of instruction steps can be obtained. Can be operated. This makes it possible to perform packet processing with the same flexibility at higher speed.
【0022】(2) 請求項2記載の発明は、前記パタ
ーンマッチングロジックをCAMとRAMを用いて構成
することを特徴とする。このように構成すれば、専用の
固定ハードウェアの場合と比較して、装置完成後にマッ
チング論理を変更することができるという柔軟性をパタ
ーンマッチングロジックに持たせることができる。(2) The invention according to claim 2 is characterized in that the pattern matching logic is configured using a CAM and a RAM. According to this configuration, the pattern matching logic can have flexibility such that the matching logic can be changed after the device is completed, as compared with the case of dedicated fixed hardware.
【0023】(3) 請求項3記載の発明は、前記パケ
ット判別情報を、前記パケット処理プロセッサの動作/
非動作とすることを特徴とする。このように構成すれ
ば、前記動作/非動作制御信号をパケット判別情報の一
部とすることで、プログラム動作メモリを効率的に使用
することができる。(3) The invention according to claim 3 is characterized in that the packet discrimination information is stored in an operation data of the packet processor.
It is characterized by not operating. With this configuration, the program operation memory can be used efficiently by using the operation / non-operation control signal as a part of the packet discrimination information.
【0024】(4) 請求項4記載の発明は、前記パケ
ット判別情報を、前記パケット処理プロセッサのプログ
ラム・バンクとすることを特徴とする。このように構成
すれば、パケット判別情報に従ってプログラム・バンク
の内、所望のものを駆動することによって、命令ステッ
プ数を消費することなく、受信したパケットデータに対
して柔軟にプログラムを実行することが可能となる。(4) The invention according to claim 4 is characterized in that the packet discrimination information is a program bank of the packet processor. With this configuration, a desired program is driven from among the program banks according to the packet identification information, so that the program can be flexibly executed on the received packet data without consuming the number of instruction steps. It becomes possible.
【0025】(5) 請求項5記載の発明は、前記パタ
ーンマッチングロジックを、装置完成後パケット判別処
理の処理手順を変更不可能な固定的ハードウェアと、装
置完成後パケット判別処理の比較論理を変更可能なCA
MとRAMで構成し、CAMとRAMが該固定的ハード
ウェアの出力パケット判別情報を補正することを特徴と
する。(5) The invention according to claim 5 is characterized in that the pattern matching logic is composed of fixed hardware which cannot change the processing procedure of the packet discriminating process after completion of the device and comparison logic of the packet discriminating process after the device is completed. Changeable CA
M and RAM, and the CAM and RAM correct the output packet discrimination information of the fixed hardware.
【0026】このように構成すれば、固定ハードウェア
及びCAM、RAM判定回路を用いてパターンマッチン
グロジックを構成することで、より柔軟性の高い回路を
実現することができる。With this configuration, a circuit with higher flexibility can be realized by configuring the pattern matching logic using the fixed hardware, the CAM, and the RAM determination circuit.
【0027】[0027]
【発明の実施の形態】以下、図面を参照して、本発明の
実施の形態例を詳細に説明する。図2は本発明のパケッ
ト処理装置を搭載した例として、パケット中継装置のブ
ロック図を示す。物理リンクから受信したパケットは、
物理レイヤのドライバ/レシーバ25でデータストリー
ムに変換され、フレーマ26を通じてパケットとして抽
出される。このようにして受信されたパケットは、パケ
ットクラシファイ部22で中継先判定等のパケットクラ
シファイ処理を行ない、宛先や必要な品質制御を決定
し、スイッチインタフェース24を介してスイッチ部3
0へパケットを引き渡す。ここで、パケットクラシファ
イ部22が本願発明に係る部分であり、CAMとRAM
とパケットエンジン22aとにより構成されている。Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 2 shows a block diagram of a packet relay device as an example equipped with the packet processing device of the present invention. Packets received from the physical link
The data is converted into a data stream by the driver / receiver 25 of the physical layer, and is extracted as a packet through the framer 26. The packet received in this manner is subjected to packet classification processing such as relay destination determination in the packet classification unit 22 to determine a destination and necessary quality control, and is switched via the switch interface 24 to the switch unit 3.
Deliver the packet to 0. Here, the packet classifying unit 22 is a part according to the present invention, and the CAM and the RAM
And a packet engine 22a.
【0028】スイッチ部30は、クラシファイ処理によ
って指定された出力先にパケットを中継する。スイッチ
部30からスイッチインタフェース24を介してパケッ
トの中継を受けたラインカード21は、パケットクラシ
ファイの結果に基づき定められた出力キューにエンキュ
ーし、物理リンクが空いた時にパケットスケジューリン
グ結果に基づき決定されたキューのパケットをフレーミ
ング処理及び物理レイヤ処理により物理リンクに応じた
形式に変換して該物理リンクへ送出する。The switch unit 30 relays the packet to an output destination specified by the classifying process. The line card 21 that has received the packet relay from the switch unit 30 via the switch interface 24 enqueues in the output queue determined based on the result of the packet classification, and is determined based on the packet scheduling result when the physical link becomes free. The packet in the queue is converted into a format corresponding to the physical link by a framing process and a physical layer process and transmitted to the physical link.
【0029】本願発明のパケット処理系は、このスイッ
チング・ルータにおいてはパケット・クラシファイ部2
2に用いられ、パケットのプロトコル種別を判定し、パ
ケットヘッダに基づき宛先を判定し、スイッチインタフ
ェース24/スイッチ部30に対してどこへ中継するか
の情報をパケットと共に通知し、またパケットの内容に
応じて適用品質制御を決定する。The packet processing system according to the present invention uses a packet classifying unit 2 in this switching router.
2, the protocol type of the packet is determined, the destination is determined based on the packet header, and information on where to relay to the switch interface 24 / switch unit 30 is sent together with the packet. Applicable quality control is determined accordingly.
【0030】図3は本発明の第1の実施の形態例を示す
ブロック図で、パターンマッチングロジックをCAM/
RAMで構成したものである。図1と同一のものは、同
一の符号を付して示す。本発明の特徴は、パターンマッ
チングロジック10にCAM(Content Add
ressable Memory)とRAM(Rand
am Access Memory)を用いた点であ
る。FIG. 3 is a block diagram showing a first embodiment of the present invention.
It is constituted by a RAM. 1 are denoted by the same reference numerals. A feature of the present invention is that the pattern matching logic 10 includes a CAM (Content Add).
resable Memory) and RAM (Rand)
am Access Memory).
【0031】図において、41はCAM、43はRAM
である。42はCAM41と接続されるCAM制御部
で、その内部にパケットデータ抽出部42aを備えてい
る。CAM制御部42からはCAM41に向けてデータ
線42bを介してデータが送出され、CAM41からは
マッチアドレス線41aを介してのアドレスと、ヒット
/ミスヒット線41bを介してヒット/ミスヒット情報
がCAM制御部42に与えられる。In the figure, 41 is a CAM, 43 is a RAM
It is. Reference numeral 42 denotes a CAM control unit connected to the CAM 41, and includes a packet data extraction unit 42a therein. Data is sent from the CAM controller 42 to the CAM 41 via the data line 42b, and the CAM 41 sends the address via the match address line 41a and the hit / miss hit information via the hit / miss hit line 41b. This is provided to the CAM control unit 42.
【0032】44はRAM43と接続されるRAM制御
部であり、RAM43へはアドレス線44aを介してア
ドレスが送出され、RAM43からはデータ線43aを
介してデータがRAM制御部44に与えられる。また、
CAM制御部42からはヒット/ミスヒット線46を介
してヒット/ミスヒット信号がRAM制御部44に与え
られ、マッチアドレス線47を介してアドレス信号がR
AM制御部44に与えられている。Reference numeral 44 denotes a RAM control unit connected to the RAM 43. An address is sent to the RAM 43 via an address line 44a, and data is supplied from the RAM 43 to the RAM control unit 44 via a data line 43a. Also,
A hit / miss hit signal is supplied from the CAM control unit 42 to the RAM control unit 44 via a hit / miss hit line 46, and an address signal is supplied to the RAM control unit 44 via a match address line 47.
It is provided to the AM control unit 44.
【0033】パケット1はパケットデータ抽出部42a
を介してCAM制御部42から出力され、FIFO(フ
ァーストイン・ファーストアウト)45に与えられる。
また、パケットデータ抽出部42aからは、パケット到
着信号線48を介してパケット到着信号がFIFO45
に与えられる。The packet 1 is a packet data extraction unit 42a
Is output from the CAM control unit 42 via the CAM control unit 42 and supplied to a FIFO (first-in first-out) 45.
The packet arrival signal is transmitted from the packet data extraction unit 42a via the packet arrival signal line 48 to the FIFO 45.
Given to.
【0034】FIFO45から出力されるパケット到着
信号はプロセッサ20の制御部12に与えられ、パケッ
トはバス2を介してプロセッサ20の汎用インタフェー
ス11に入り、プロセッサ20の内部に入力される。ま
た、RAM制御部44からはプログラムバンク値信号線
49を介してプログラムバンク値信号がプロセッサ20
の制御部12に与えられ、またプロセッサ動作制御信号
線50を介してプロセッサ動作制御信号がプロセッサ2
0の制御部12に与えられている。The packet arrival signal output from the FIFO 45 is supplied to the control unit 12 of the processor 20, and the packet enters the general-purpose interface 11 of the processor 20 via the bus 2 and is input into the processor 20. Also, a program bank value signal is sent from the RAM control unit 44 via the program bank value signal line 49 to the processor 20.
And a processor operation control signal is supplied to the processor 2 via a processor operation control signal line 50.
0 is provided to the control unit 12.
【0035】図4は本発明の第1の実施の形態例のCA
M/RAMの内容を示す図である。CAMとは、アドレ
スを指定することにより、該アドレスに格納しているデ
ータを出力するRAMと違い、データを指定(検索キー
データ)することにより、その格納内容を検索し、一致
するエントリデータがあるならば(ヒット)、そのエン
トリデータを格納しているアドレス値を出力するメモリ
デバイスである。FIG. 4 shows a CA according to the first embodiment of the present invention.
FIG. 3 is a diagram illustrating the contents of an M / RAM. Unlike a RAM that outputs data stored at an address by specifying an address, the CAM searches the stored content by specifying data (search key data) and finds a matching entry data. If there is a hit (hit), the memory device outputs an address value storing the entry data.
【0036】各エントリデータと検索キーデータとの比
較処理を専用ハードウェアでパラレルに処理するため、
CAMは高速に対応する検索キーデータを検索すること
が可能である。更に、CAMのエントリデータとして
は、“0”、“1”のビットに加えて“X”(Dont
Care)のビットも一般的に定義可能な機能を備え
ている。Since the comparison processing between each entry data and the search key data is processed in parallel by dedicated hardware,
The CAM can search for the corresponding search key data at high speed. Further, as the CAM entry data, in addition to the “0” and “1” bits, “X” (Dont
Care) bits also have a generally definable function.
【0037】図3の実施の形態例においては、パターン
マッチングロジック10をCAM41とRAM43によ
って構成している。図のパケット処理系は、ネットワー
クインタフェース5により受信したパケットを、パター
ンマッチングロジック10のCAM制御部42へ送信す
る。この際、ネットワークインタフェース5は、パケッ
トデータと同期してパケット到着信号線48を介してパ
ケット到着信号をCAM制御部42へ送信し、CAM制
御部42は該パケット到着信号をもって、パケットの到
着を検知することができる。以降、FIFO45及びプ
ロセッサ20も、パケット到着信号をもってパケットの
到着を検知し、これをトリガとして該受信パケット1に
対するパケット処理を実行する。In the embodiment shown in FIG. 3, the pattern matching logic 10 is constituted by the CAM 41 and the RAM 43. The packet processing system shown in the figure transmits a packet received by the network interface 5 to the CAM control unit 42 of the pattern matching logic 10. At this time, the network interface 5 transmits a packet arrival signal to the CAM controller 42 via the packet arrival signal line 48 in synchronization with the packet data, and the CAM controller 42 detects the arrival of the packet based on the packet arrival signal. can do. Thereafter, the FIFO 45 and the processor 20 also detect the arrival of the packet based on the packet arrival signal, and execute packet processing on the received packet 1 using this as a trigger.
【0038】パケットを受信したCAM制御部42は、
パケットデータ中からCAMの検索キーデータとなる部
位を抽出し、データ線(検索キー)42bを介して、C
AM41に対して検索を指示する。CAM制御部42内
のパケットデータ抽出部42aは、上述のパケットデー
タ中からCAM41への検索キーデータの抽出を行な
う。抽出方法としては、パケットデータ抽出部42a
は、例えばパケットデータの先頭から固定領域のデータ
を検索キーデータとして抽出してもよいし、上述のパケ
ットデータの先頭からのオフセットを予め装置設計者が
指定しておいたレジスタ中の値に基づき、抽出すること
も可能である。Upon receiving the packet, the CAM control unit 42
A part to be the search key data of the CAM is extracted from the packet data, and the data is extracted through the data line (search key) 42b.
A search is instructed to AM41. The packet data extraction unit 42a in the CAM control unit 42 extracts search key data from the above-described packet data to the CAM 41. As an extraction method, the packet data extraction unit 42a
For example, the data in the fixed area may be extracted from the beginning of the packet data as search key data, or the offset from the beginning of the packet data may be extracted based on a value in a register specified in advance by a device designer. , Can also be extracted.
【0039】検索キーデータを受信したCAM41は、
検索キーデータに対応するエントリデータを検索し、対
応するエントリデータがあるならば、そのアドレス値
(マッチアドレス)とヒットしたことを示す値をそれぞ
れマッチアドレス線41a、ヒット/ミスヒット線41
bを介してCAM制御部42へ通知する。ここで、上述
の抽出したパケットデータとCAM41内のエントリデ
ータとの対応関係、及び上述のマッチアドレスとRAM
データとの対応関係については後述する。When the CAM 41 receives the search key data,
The entry data corresponding to the search key data is searched, and if there is the corresponding entry data, its address value (match address) and the value indicating the hit are matched address line 41a and hit / miss hit line 41, respectively.
b to the CAM control unit 42. Here, the correspondence between the extracted packet data and the entry data in the CAM 41, and the match address and the RAM
The correspondence with the data will be described later.
【0040】次に、マッチアドレスを受信したRAM制
御部44は、ヒット/ミスヒット線46がヒットを示し
ていたならば、受信したマッチアドレスをそのままRA
M43へのアドレスとして与え、RAM43からアドレ
スに対応するデータを受信する。この際、上述の一連の
RAM43へのリードアクセス処理には一定の処理時間
が必要なので、その処理時間の間、FIFO45がパケ
ットデータ及びパケット到着信号を格納し、上述の処理
時間とRAM制御部44からの出力データとの同期をと
る。Next, if the hit / miss hit line 46 indicates a hit, the RAM control unit 44 that has received the match address uses the received match address as it is in the RA.
The data is provided as an address to the M43, and data corresponding to the address is received from the RAM 43. At this time, since a certain processing time is required for the above-described series of read access processing to the RAM 43, the FIFO 45 stores the packet data and the packet arrival signal during the processing time, and the processing time and the RAM control unit 44 described above. Synchronize with the output data from.
【0041】次に、RAM43からのデータを受信した
RAM制御部44は、データ中の値に基づいてプログラ
ムバンク値及びプロセッサ動作制御信号を決定し、プロ
セッサ20へ送信する。プログラムバンク値は、前述し
た内容と同等であり、プロセッサ動作制御信号は、プロ
セッサの命令駆動動作自体を制御する制御信号である。
プロセッサ動作制御信号が非動作を示す時は、プロセッ
サ20はパケット到着信号を受信しても命令駆動動作を
実行しない。これは、ある特定のパケットに関しては、
プログラム処理の実行を欲しない時は、ある特定のプロ
グラムバンク中を“NOP”(No Operatio
n)命令で埋めるといった、非効率的なプログラムバン
ク使用を回避することを可能とするためである。これに
よれば、動作/非動作制御信号をパケット判別情報の一
部とすることで、プログラム動作メモリを効率的に使用
することができる。Next, the RAM control unit 44 that has received the data from the RAM 43 determines the program bank value and the processor operation control signal based on the value in the data, and transmits them to the processor 20. The program bank value is equivalent to the contents described above, and the processor operation control signal is a control signal for controlling the instruction driving operation itself of the processor.
When the processor operation control signal indicates non-operation, the processor 20 does not execute the instruction driving operation even when receiving the packet arrival signal. This means that for a particular packet,
When execution of the program processing is not desired, “NOP” (No Operation) is executed in a specific program bank.
n) It is possible to avoid inefficient use of a program bank such as filling with an instruction. According to this, by making the operation / non-operation control signal a part of the packet discrimination information, the program operation memory can be used efficiently.
【0042】以上、説明したように、本発明によれば、
パターンマッチングロジックをCAMとRAMを用いて
構成することによりて 専用の固定ハードウェアの場合
と比較して、装置完成後にマッチング論理を変更するこ
とができるとという柔軟性をパターンマッチングロジッ
クに持たせることができる。As described above, according to the present invention,
By making the pattern matching logic using CAM and RAM, the pattern matching logic has the flexibility that the matching logic can be changed after the device is completed, as compared to the case of dedicated fixed hardware. Can be.
【0043】パケット到着信号線48からのパケット到
着信号を受信したプロセッサ20は、プロセッサ動作制
御信号及びプログラムバンク値信号線49からのプログ
ラムバンク信号の値に従って、プログラムバンク17を
切り替え、受信したパケットデータに対応する所望のプ
ログラムを駆動することによって、命令ステップ数を消
費することなく、受信したパケットデータに対応して柔
軟にプログラムを実行することが可能になる。The processor 20 that has received the packet arrival signal from the packet arrival signal line 48 switches the program bank 17 according to the processor operation control signal and the value of the program bank signal from the program bank value signal line 49, and receives the received packet data. By driving a desired program corresponding to the received packet data, the program can be flexibly executed according to the received packet data without consuming the number of instruction steps.
【0044】更に、ここで上述の抽出したパケットデー
タとCAM41内のエントリデータとの対応関係及び上
述のマッチアドレスとRAM内データとの対応関係につ
いて、図4を一例として説明する。The correspondence between the extracted packet data and the entry data in the CAM 41 and the correspondence between the match address and the data in the RAM will now be described with reference to FIG.
【0045】図4のCAM内容及びRAM内容は、受信
したIPパケットがUDP(User Datagra
m Protocol)であるならば、プログラムバン
ク値が“5”であるプログラムバンクをプロセッサ20
が実行するように指示するエントリ内容となっている。
ここで、UDPとは、IPパケットのプロトコルスタッ
クとして、上位レイヤであるトランスポートレイヤのプ
ロトコルである。The content of the CAM and the content of the RAM in FIG. 4 indicate that the received IP packet is a UDP (User Datagram).
m Protocol), the program bank whose program bank value is “5” is assigned to the processor 20.
Is the entry content to instruct to execute.
Here, UDP is a protocol of a transport layer which is an upper layer as a protocol stack of an IP packet.
【0046】受信パケットがUDPパケットであること
は、IPヘッダ内のヘッダ先頭からの固定位置(オフセ
ット)に存在するプロトコルフィールドを参照すれば判
別可能であり、その値は17となっている。図では、パ
ケットデータから抽出した検索キーデータのIPヘッダ
内プロトコルフィールドが17となっている。これは、
パケットデータから抽出した検索キーデータでは、図4
の指示した位置に該当することを示す。Whether the received packet is a UDP packet can be determined by referring to a protocol field present at a fixed position (offset) from the head of the header in the IP header, and its value is 17. In the figure, the protocol field in the IP header of the search key data extracted from the packet data is 17. this is,
In the search key data extracted from the packet data, FIG.
Indicates that it corresponds to the position indicated by.
【0047】図中の検索キーデータでCAM41が検索
を実行すると、そのエントリデータ内容からアドレス値
=0x0000にヒットする。ここで、“0x”は16
進を表わす。次に、該アドレス値のRAMデータをRA
M制御部44が参照すると、その値は動作/非動作フラ
グ=1、プログラムバンク値=5となっており、該デー
タをそれぞれに信号線を介してプロセッサ20へ通知す
ることによって、プロセッサ20はプログラムバンク値
=5のプログラムを実行する。なお、図中の“High
est Priority”とは、検索キーデータに対
してエントリデータが複数ヒットした場合のヒットエン
トリ間の優先度を示している。図の場合、マルチヒット
した場合、CAM41はより小さいアドレス値をマッチ
アドレスとして出力することを意味している。When the CAM 41 performs a search using the search key data shown in the figure, the address value = 0x0000 is hit from the entry data content. Here, “0x” is 16
Represents hexadecimal. Next, the RAM data of the address value is stored in RA
Referring to the M control unit 44, the values are the operation / non-operation flag = 1 and the program bank value = 5. By notifying the data to the processor 20 via a signal line, the processor 20 The program with the program bank value = 5 is executed. It should be noted that “High” in FIG.
"est Priority" indicates the priority between hit entries when a plurality of entry data hits the search key data. In the case of the figure, when multiple hits occur, the CAM 41 uses a smaller address value as a match address. Means to output.
【0048】装置設計者は、上述のCAM/RAMの機
能とパケットデータとの対応関係をふまえてCAM及び
RAMのエントリデータの設定やプログラムバンクへ格
納するプログラムのコーディングを予め行なうことが可
能である。上述のように、パターンマッチングロジック
10を専用の固定ハードウェアで構成するのではなく、
CAM/RAMで構成することによって装置完成後にマ
ッチング論理を変更することができるという柔軟性をパ
ターンマッチングロジック10に持たせることができる
という効果がある。The device designer can set the CAM and RAM entry data and code the program to be stored in the program bank in advance based on the correspondence between the CAM / RAM function and the packet data. . As described above, instead of configuring the pattern matching logic 10 with dedicated fixed hardware,
By using a CAM / RAM, there is an effect that the pattern matching logic 10 can have the flexibility of changing the matching logic after the device is completed.
【0049】なお、図3の実施の形態例においては、プ
ログラムバンクがプロセッサ20内に格納されている
が、プログラムバンクはプロセッサ外のメモリ等の記憶
デバイスに格納され、そこからプログラムをプロセッサ
20が読み込む構成としてもよい。Although the program bank is stored in the processor 20 in the embodiment of FIG. 3, the program bank is stored in a storage device such as a memory outside the processor, and the processor 20 stores the program therefrom. It may be configured to read.
【0050】また、図3の実施の形態例においては、プ
ロセッサ20がパケットデータを汎用インタフェース1
1を介して読み込んでいるが、汎用インタフェースでは
なく、何らかの専用のパケットデータ受信インタフェー
スを介してパケットデータを読み込む構成とすることも
できる。In the embodiment of FIG. 3, the processor 20 transmits packet data to the general-purpose interface 1.
1, the packet data may be read not through the general-purpose interface but through some dedicated packet data receiving interface.
【0051】また、図3の実施の形態例においては、全
てのパケット判別情報(図3の実施の形態例においてプ
ロセッサ動作制御信号とプログラムバンク値)を、命令
発行(各ステップ数の消費)が伴わない、インタフェー
スを介してプロセッサが受信したが、例えばプロセッサ
が一部のパケット判別情報を命令発行(各ステップ数の
消費)が伴うインタフェースを介して受信し、一部のパ
ケット判別情報を命令発行(各ステップ数の消費)が伴
わないインタフェースを介して受信するという構成も可
能である。プロセッサが、汎用的なデータ形式でパケッ
ト判別情報を受信することは、パケット処理の高速化と
いう点ではデメリットとなるが、伝達情報の自由度とい
う点では利点があり、両者は相補的な関係にある。In the embodiment of FIG. 3, all packet discrimination information (the processor operation control signal and the program bank value in the embodiment of FIG. 3) is used to issue an instruction (consumption of each step number). The processor receives the packet identification information via the interface which is not accompanied by the processor. For example, the processor receives some packet identification information via the interface accompanied by instruction issuance (consumption of the number of steps) and issues some packet identification information by the instruction. A configuration is also possible in which reception is performed via an interface that does not involve (consumption of each step number). The fact that the processor receives the packet discrimination information in a general-purpose data format has a disadvantage in terms of speeding up packet processing, but has an advantage in terms of the degree of freedom of transmitted information, and the two have a complementary relationship. is there.
【0052】図5、図6は本発明の第2の実施の形態例
を示すブロック図、図7は図5中のパターンマッチング
ロジック内のRAMのエントリ内容を示す図である。図
5において図3と同一のものは、同一の符号を付して示
す。図5、図6に示す実施の形態例は、パターンマッチ
ングロジックを図3の第1の実施の形態例と同様にCA
M/RAMで構成すると共に、固定ハードウェアパケッ
ト判定回路とも組み合わせて構成し、CAM/RAMの
構成回路に固定ハードウェアパケット判定回路のパケッ
ト判定情報の出力値の補正機能を加えた実施の形態例で
ある。図5の〜と図6の〜はそれぞれ同一接続
箇所を示している。FIGS. 5 and 6 are block diagrams showing a second embodiment of the present invention, and FIG. 7 is a diagram showing the contents of a RAM entry in the pattern matching logic in FIG. 5, the same components as those in FIG. 3 are denoted by the same reference numerals. In the embodiment shown in FIGS. 5 and 6, the pattern matching logic is the same as that of the first embodiment shown in FIG.
An embodiment in which an M / RAM is configured and combined with a fixed hardware packet determination circuit, and a correction function of the output value of the packet determination information of the fixed hardware packet determination circuit is added to the CAM / RAM configuration circuit. It is. 5 to 6 indicate the same connection points.
【0053】また、パターンマッチングロジックの出力
値を受信するパケット処理プロセッサとして図6に示す
ようなパイプライン構成のパケット処理プロセッサをも
って構成し、全体のパケット処理系を構成している。As a packet processing processor for receiving the output value of the pattern matching logic, a packet processing processor having a pipeline configuration as shown in FIG. 6 is configured to constitute the entire packet processing system.
【0054】図5において、60はパターンマッチング
ロジック10内に設けられた固定ハードウェアパケット
判定回路である。該固定ハードウェアパケット判定回路
60は、ネットワークインタフェース5からパケットと
パケット到着信号を受けて、パケット判別情報を出力す
る。ここでは、パケット判別情報として#a、#b、#
cまでの3個のパケット判別情報を出力する例を示す。
これらパケット判定情報#a、#b、#cは多重化部
(MUX)51に入力されている。In FIG. 5, reference numeral 60 denotes a fixed hardware packet judgment circuit provided in the pattern matching logic 10. The fixed hardware packet determination circuit 60 receives a packet and a packet arrival signal from the network interface 5 and outputs packet determination information. Here, #a, #b, #
An example of outputting three pieces of packet identification information up to c is shown.
The packet determination information #a, #b, #c is input to the multiplexing unit (MUX) 51.
【0055】一方、RAM制御部44からはプログラム
バンク値信号、プロセッサ動作制御信号に加えて、パケ
ット判別情報補正信号#a、#b、#cを出力する。こ
れらパケット判別情報補正信号#a、#b、#cは、前
記多重化部51に入力されている。多重化部51は、固
定ハードウェアパケット判定回路60の出力であるパケ
ット判別情報#a、#b、#cをパケット判別情報補正
信号#a、#b、#cで補正する構成となっている。On the other hand, in addition to the program bank value signal and the processor operation control signal, the RAM control section 44 outputs packet discrimination information correction signals #a, #b, #c. These packet discrimination information correction signals #a, #b, and #c are input to the multiplexing unit 51. The multiplexing unit 51 is configured to correct the packet discrimination information #a, #b, #c output from the fixed hardware packet discrimination circuit 60 with the packet discrimination information correction signals #a, #b, #c. .
【0056】図6において、70はパケット処理部であ
り、複数のパケット処理プロセッサ80から構成されて
いる。ここでは、パケット処理プロセッサをPrc#1
〜Prc#3として表わす。プロセッサ80は、CAM
81、RAM82、アクセス制御部83、内部レジスタ
84、演算ユニット85、プログラム86、制御部8
7、内部状態88、タイミング制御部89、データ入力
部90、パケットアクセスレジスタ91、データ出力部
92から構成されている。この構成は、他のPrc#
2、Prc#3についても同様である。In FIG. 6, reference numeral 70 denotes a packet processing unit, which comprises a plurality of packet processing processors 80. Here, the packet processor is Prc # 1
PPrc # 3. Processor 80 is a CAM
81, RAM 82, access control unit 83, internal register 84, arithmetic unit 85, program 86, control unit 8
7, an internal state 88, a timing control section 89, a data input section 90, a packet access register 91, and a data output section 92. This configuration is different from other Prc #
2, Prc # 3.
【0057】パターンマッチングロジック10からのパ
ケット判別情報#a、#b、#c(多重化部51の出
力)とパケットデータは、データ入力部90に入り、パ
ケット到着信号はタイミング制御部89に入り、プログ
ラムバンク値信号とプロセッサ動作制御信号は、Prc
#1の制御部87に入っている。プロセッサ80は互い
に直列接続されてパイプライン構成となっている。この
パイプライン構成のパケット処理プロセッサは、特願平
11−158514号において出願人が提案したもので
ある。The packet identification information #a, #b, #c (output of the multiplexing unit 51) and the packet data from the pattern matching logic 10 enter the data input unit 90, and the packet arrival signal enters the timing control unit 89. , The program bank value signal and the processor operation control signal are Prc
It is in the control unit 87 of # 1. The processors 80 are connected in series to form a pipeline. This pipelined packet processor is proposed by the applicant in Japanese Patent Application No. 11-158514.
【0058】その特徴は、パケットデータを直接取り込
むレジスタであるパケットアクセスレジスタ91をプロ
セッサ80内に設けることによって、高速にパケットデ
ータにアクセスするパケットデータアクセス機構を構築
し、パケットデータに関する読み込み/書き込み処理の
オーバヘッドを解消することにより、プログラムによる
処理手順記述が可能であるという柔軟性と高速なパケッ
ト処理を実現している。The feature is that a packet data access mechanism for accessing packet data at high speed is constructed by providing a packet access register 91 which is a register for directly taking in packet data in the processor 80, and a read / write process for packet data is performed. By eliminating the overhead of (1), the flexibility that a processing procedure can be described by a program and the high-speed packet processing are realized.
【0059】また、上述のパケット処理プロセッサ80
は、複数直列に接続して前段のパケット処理プロセッサ
のパケット処理結果出力を次のパケット処理プロセッサ
のデータ入力とすることによって、一つのパケットに着
目すると、直列配備されたプロセッサにより、パケット
処理全体をパイプライン処理で実行するという構成をと
ることが容易である。The above-described packet processor 80
When one packet is focused on by connecting a plurality of serially connected and using the packet processing result output of the previous packet processing processor as the data input of the next packet processing processor, the whole packet processing is performed by the serially arranged processors. It is easy to adopt a configuration of executing by pipeline processing.
【0060】このようなパイプライン処理系を構成する
ことにより、所望のパケット処理が複雑でプログラム記
述した時に命令ステップ数が増大しても、その処理ステ
ップをパイプラインを構成する各々のプロセッサ毎に処
理を分割して一つのプロセッサ当たりの処理量を一定以
下にすることで、パケット処理スループットを高めるこ
とが可能となる。更に、上述の構成においては、パケッ
ト処理プロセッサ間でプロセッサの内部状態88を次段
のプロセッサに引き継ぐ構成をとっている。By configuring such a pipeline processing system, even if the desired packet processing is complicated and the number of instruction steps increases when a program is described, the processing steps are performed for each processor constituting the pipeline. By dividing the processing so that the processing amount per processor is equal to or less than a certain value, it is possible to increase the packet processing throughput. Further, in the above configuration, the internal state 88 of the processor is taken over between the packet processing processors to the next processor.
【0061】図6のパケット処理系においては、パター
ンマッチングロジックの出力値であるプログラムバンク
信号と、プロセッサ動作制御信号がパイプライン構成の
先頭パケット処理プロセッサの制御部87へ直接入力さ
れている。そして、その内部状態を切り替えると共に、
先頭パケット処理プロセッサ80の内部状態が次段のパ
ケット処理プロセッサの内部状態へと引き継がれること
によって、複数のパケット処理プロセッサ80によって
一連のパケット処理プログラムが実行可能となる。In the packet processing system shown in FIG. 6, a program bank signal, which is an output value of the pattern matching logic, and a processor operation control signal are directly input to the control unit 87 of the first packet processing processor having a pipeline configuration. And while switching its internal state,
By taking over the internal state of the first packet processor 80 to the internal state of the next packet processor, a plurality of packet processors 80 can execute a series of packet processing programs.
【0062】一方、パターンマッチングロジック10の
出力値であるパケット判別情報#a、#b、#cは、パ
ケット処理プロセッサ80が図中に示したバスを介して
汎用的なパケット付帯パラメータとして受信し、パケッ
ト処理プロセッサ80は、該情報に基づいたプログラム
処理も実行することが可能である。パケット処理プロセ
ッサ80が汎用的なパケット付帯パラメータを参照する
ためには、命令発行を伴うが、パケット処理プロセッサ
80が受信データを解釈する自由度が高いという利点が
ある。On the other hand, the packet discrimination information #a, #b, #c, which is the output value of the pattern matching logic 10, is received by the packet processor 80 as a general-purpose packet accompanying parameter via the bus shown in FIG. , The packet processor 80 can also execute a program process based on the information. In order for the packet processor 80 to refer to the general-purpose packet accompanying parameters, an instruction is issued, but there is an advantage that the packet processor 80 has a high degree of freedom in interpreting the received data.
【0063】以下に、パターンマッチングロジックの動
作を説明する。図5、図6に示すパターンマッチングロ
ジック10は、CAM/RAMがパケットデータの比較
処理を実行するのと同時に、新たに設けた固定ハードウ
ェアパケット判定回路60もパケットデータの比較処理
を実行する。固定ハードウェアパケット判定回路60
は、論理的な比較処理自体を対象とするパケットデータ
及びパケットフォーマットに限定して回路を最適化して
作成するため、CAMと比較すると回路規模が小さくな
る利点、多段の比較処理が行えるという利点がある反
面、装置設計後はその比較処理を変更することはできな
い。The operation of the pattern matching logic will be described below. In the pattern matching logic 10 shown in FIGS. 5 and 6, at the same time that the CAM / RAM executes the comparison processing of the packet data, the newly provided fixed hardware packet determination circuit 60 also executes the comparison processing of the packet data. Fixed hardware packet judgment circuit 60
Since the circuit is created by optimizing the circuit only for the packet data and the packet format for the logical comparison processing itself, there is an advantage that the circuit scale is smaller than that of the CAM and an advantage that the multi-stage comparison processing can be performed. On the other hand, the comparison process cannot be changed after the device is designed.
【0064】そこで、パターンマッチングロジック10
のRAMのエントリとして図7に示すように固定ハード
ウェアパケット判定回路60が出力するパケット判別情
報#a、#b、#cに対する補正情報を格納することに
よって、固定ハードウェアパケット判定回路60の出力
値を装置設計後に、ある程度柔軟に変更することが可能
となる。図7に示すRAMの構成は、アドレス値に対し
て、パケット判別情報補正イネーブルデータと、パケッ
ト判別情報補正データとがa〜c毎にペアで格納されて
いる。図5に示すパケット判別情報補正信号は、パケッ
ト判別情報補正イネーブルデータとパケット判別情報補
正データで構成されている。そして、動作/非動作、プ
ログラムバンク値も格納されている。Therefore, the pattern matching logic 10
As shown in FIG. 7, the correction information for the packet determination information #a, #b, and #c output from the fixed hardware packet determination circuit 60 is stored as an entry in the RAM of FIG. The value can be changed flexibly to some extent after the device is designed. In the configuration of the RAM shown in FIG. 7, packet identification information correction enable data and packet identification information correction data are stored in pairs for each of a to c with respect to an address value. The packet discrimination information correction signal shown in FIG. 5 includes packet discrimination information correction enable data and packet discrimination information correction data. The operation / non-operation and program bank values are also stored.
【0065】上述の組み合わせのように、固定ハードウ
ェアパケット判定回路60及びCAM/RAM判定回路
を用いて、パターンマッチングロジックを構成すること
によって、上述した両回路の利点をより柔軟性高く発揮
することが可能となる。By configuring the pattern matching logic using the fixed hardware packet determination circuit 60 and the CAM / RAM determination circuit as in the above-described combination, the advantages of the above-described two circuits can be exhibited more flexibly. Becomes possible.
【0066】以下に、具体的に図5、図6のパターンマ
ッチングロジック10のRAMのエントリ内容と固定ハ
ードウェアパケット判定回路60の出力補正方法につい
て説明する。The contents of the RAM entry of the pattern matching logic 10 of FIGS. 5 and 6 and the method of correcting the output of the fixed hardware packet determination circuit 60 will be specifically described below.
【0067】図5において、固定ハードウェアパケット
判定回路60は、例えばパケット判別情報として#a、
#b、#cを出力する。例えば、パケット判別情報#
a、#bの結果を補正したい場合、RAMのアドレス値
0x0000のようにエントリデータを装置設計者が設
定する。図7のRAMのアドレス値0x0000の意味
は、CAM41によってヒットしたアドレス値のエント
リが、例えばパケット判別情報補正イネーブル(Ena
ble)#a=1(イネーブル)である場合、パケット
判別情報補正データ#aの値に固定ハードウェアパケッ
ト判定回路60の出力値であるパケット判別情報#aを
変更することを意味する。In FIG. 5, for example, the fixed hardware packet determination circuit 60
#B and #c are output. For example, packet identification information #
When it is desired to correct the results of a and #b, the device designer sets entry data such as an address value 0x0000 in the RAM. The meaning of the address value 0x0000 of the RAM in FIG. 7 means that the entry of the address value hit by the CAM 41 is, for example, the packet discrimination information correction enable (Ena).
ble) If # a = 1 (enable), it means that the packet discrimination information #a, which is the output value of the fixed hardware packet discrimination circuit 60, is changed to the value of the packet discrimination information correction data #a.
【0068】図7のRAMのアドレス値0x0000の
エントリデータの場合では、多重化部51がパケット判
別情報#a、#b、#c及びパケット判別情報補正信号
#a、#b、#cを受信し、パケット判別情報#aを
“5”へ、パケット判別情報#bを“10”へ変更し、
パケット判別情報#cは変更しないで、固定ハードウェ
アパケット判定回路60の出力値をそのままパケット処
理プロセッサ80に送信する。In the case of the entry data having the address value 0x0000 in the RAM of FIG. 7, the multiplexing unit 51 receives the packet discrimination information #a, #b, #c and the packet discrimination information correction signals #a, #b, #c. Then, the packet identification information #a is changed to “5” and the packet identification information #b is changed to “10”,
The output value of the fixed hardware packet determination circuit 60 is transmitted to the packet processor 80 as it is without changing the packet determination information #c.
【0069】上述のようにパターンマッチングロジック
10及びパケット処理プロセッサ80を構成することに
よって、パターンマッチングロジックのパケット判別情
報に応じて、複数のパケット処理プロセッサがパケット
判別情報の解釈の柔軟性が高く、かつ高速に一連のパケ
ット処理を実行することができる。By configuring the pattern matching logic 10 and the packet processing processor 80 as described above, a plurality of packet processors have high flexibility in interpreting the packet determination information according to the packet determination information of the pattern matching logic. A series of packet processing can be executed at high speed.
【0070】[0070]
【発明の効果】以上説明したように、本発明によれば、
以下の効果が得られる。 (1)請求項1記載の発明によれば、プロセッサがパケ
ットデータを受信し、その内部状態を命令を駆動せずに
切り替えることによって、命令ステップ数を消費せずに
パケット判別情報に従った、所望のプログラムを動作さ
せることができる。これにより、同等の柔軟性を持つパ
ケット処理をより高速に行なうことが可能となる。As described above, according to the present invention,
The following effects can be obtained. (1) According to the first aspect of the present invention, the processor receives the packet data and switches its internal state without driving the instruction, thereby following the packet discrimination information without consuming the number of instruction steps. A desired program can be operated. This makes it possible to perform packet processing with the same flexibility at higher speed.
【0071】(2) 請求項2記載の発明によれば、専
用の固定ハードウェアの場合と比較して、装置完成後に
マッチング論理を変更することができるという柔軟性を
パターンマッチングロジックに持たせることができる。(2) According to the second aspect of the present invention, the pattern matching logic is provided with the flexibility that the matching logic can be changed after the device is completed, as compared with the case of dedicated fixed hardware. Can be.
【0072】(3) 請求項3記載の発明によれば、前
記動作/非動作制御信号をパケット判別情報の一部とす
ることで、プログラム動作メモリを効率的に使用するこ
とができる。(3) According to the third aspect of the invention, by using the operation / non-operation control signal as a part of the packet discrimination information, the program operation memory can be used efficiently.
【0073】(4) 請求項4記載の発明によれば、パ
ケット判別情報に従ってプログラム・バンクの内、所望
のものを駆動することによって、命令ステップ数を消費
することなく、受信したパケットデータに対して柔軟に
プログラムを実行することが可能となる。(4) According to the fourth aspect of the present invention, by driving a desired one of the program banks in accordance with the packet discrimination information, the received packet data can be processed without consuming the number of instruction steps. And the program can be executed flexibly.
【0074】(5) 請求項5記載の発明によれば、固
定ハードウェア及びCAM、RAM判定回路を用いてパ
ターンマッチングロジックを構成することで、より柔軟
性の高い回路を実現することができる。(5) According to the fifth aspect of the present invention, by configuring the pattern matching logic using the fixed hardware, the CAM, and the RAM determination circuit, a circuit with higher flexibility can be realized.
【0075】このように、本発明によれば、パケット処
理の高速化が可能なパケット処理装置を提供することが
できる。As described above, according to the present invention, it is possible to provide a packet processing apparatus capable of speeding up packet processing.
【図1】本発明の原理ブロック図である。FIG. 1 is a principle block diagram of the present invention.
【図2】本発明によるパケット中継装置のブロック図で
ある。FIG. 2 is a block diagram of a packet relay device according to the present invention.
【図3】本発明の第1の実施の形態例を示すブロック図
である。FIG. 3 is a block diagram showing a first embodiment of the present invention.
【図4】本発明の第1の実施の形態例のCAM/RAM
の内容を示す図である。FIG. 4 is a CAM / RAM according to the first embodiment of the present invention;
It is a figure which shows the content of.
【図5】本発明の第2の実施の形態例を示すブロック図
である。FIG. 5 is a block diagram showing a second embodiment of the present invention.
【図6】本発明の第2の実施の形態例を示すブロック図
である。FIG. 6 is a block diagram showing a second embodiment of the present invention.
【図7】第2の実施の形態例のRAMの内容を示す図で
ある。FIG. 7 is a diagram showing the contents of a RAM according to the second embodiment.
【図8】従来のプロセッサを用いたパケット処理の構成
を示す図である。FIG. 8 is a diagram showing a configuration of a packet processing using a conventional processor.
1 パケット 2 バス 3 パケット到着信号線 4 プログラムバンク値信号線 10 パターンマッチングロジック 11 汎用インタフェース 12 制御部 12a 命令デコーダ 12b プログラム・カウンタ 13 汎用レジスタ 14 演算器 15 外部バスバッファ 16 フラグ・レジスタ 17 プログラムバンク 20 プロセッサ 1 packet 2 bus 3 packet arrival signal line 4 program bank value signal line 10 pattern matching logic 11 general-purpose interface 12 control unit 12a instruction decoder 12b program counter 13 general-purpose register 14 arithmetic unit 15 external bus buffer 16 flag register 17 program bank 20 Processor
───────────────────────────────────────────────────── フロントページの続き (72)発明者 梅崎 康之 福岡県福岡市博多区博多駅前三丁目22番8 号 富士通九州ディジタル・テクノロジ株 式会社内 (72)発明者 若吉 光春 福岡県福岡市博多区博多駅前三丁目22番8 号 富士通九州ディジタル・テクノロジ株 式会社内 Fターム(参考) 5K030 HA08 HB19 KA01 KA02 KA05 5K033 AA02 CC01 DB12 DB14 5K034 AA02 EE11 FF01 HH25 HH63 ──────────────────────────────────────────────────続 き Continued on the front page (72) Yasuyuki Umezaki Inventor 3-2-2-8 Hakata Ekimae, Hakata-ku, Fukuoka City, Fukuoka Prefecture Inside Fujitsu Kyushu Digital Technology Co., Ltd. (72) Mitsuharu Wakayoshi Hakata, Fukuoka City, Fukuoka Prefecture 3-22-8, Hakata Ekimae, F-term F-term in Fujitsu Kyushu Digital Technology Co., Ltd. (reference) 5K030 HA08 HB19 KA01 KA02 KA05 5K033 AA02 CC01 DB12 DB14 5K034 AA02 EE11 FF01 HH25 HH63
Claims (5)
チングロジックを用いてパケットの判別を行ない、パケ
ット処理プロセッサが該パケット判別情報に従い、該パ
ケット処理プロセッサの内部状態を命令を駆動せずに切
り替えることによってパケット判別情報に従った所望の
プログラムを動作させることを特徴とするパケット処理
装置。An input packet is discriminated in advance using a pattern matching logic, and a packet processor switches the internal state of the packet processor without driving an instruction according to the packet discrimination information. A packet processing device for operating a desired program according to packet discrimination information.
MとRAMを用いて構成することを特徴とする請求項1
記載のパケット処理装置。2. The method according to claim 1, wherein the pattern matching logic is a CA.
2. The apparatus according to claim 1, wherein the memory is configured using M and a RAM.
The packet processing device according to claim 1.
処理プロセッサの動作/非動作とすることを特徴とする
請求項1記載のパケット処理装置。3. The packet processing device according to claim 1, wherein the packet discrimination information is set to an operation / non-operation of the packet processor.
処理プロセッサのプログラム・バンクとすることを特徴
とする請求項1記載のパケット処理装置。4. The packet processing apparatus according to claim 1, wherein the packet discrimination information is a program bank of the packet processing processor.
置完成後パケット判別処理の処理手順を変更不可能な固
定的ハードウェアと、装置完成後パケット判別処理の比
較論理を変更可能なCAMとRAMで構成し、CAMと
RAMが該固定的ハードウェアの出力パケット判別情報
を補正することを特徴とする請求項2記載のパケット処
理装置。5. The pattern matching logic is composed of fixed hardware that cannot change the processing procedure of packet discrimination processing after device completion, and CAM and RAM that can change comparison logic of packet discrimination processing after device completion. 3. The packet processing apparatus according to claim 2, wherein the CAM and the RAM correct the output packet discrimination information of the fixed hardware.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001138243A JP2002335275A (en) | 2001-05-09 | 2001-05-09 | Packet processing device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001138243A JP2002335275A (en) | 2001-05-09 | 2001-05-09 | Packet processing device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2002335275A true JP2002335275A (en) | 2002-11-22 |
Family
ID=18985214
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2001138243A Withdrawn JP2002335275A (en) | 2001-05-09 | 2001-05-09 | Packet processing device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2002335275A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2004068804A1 (en) * | 2003-01-29 | 2004-08-12 | Fujitsu Limited | Packet identification device and packet identification method |
| WO2006072986A1 (en) * | 2005-01-06 | 2006-07-13 | Fujitsu Limited | Associative memory device and routing device using it |
| WO2014125636A1 (en) * | 2013-02-18 | 2014-08-21 | 日本電信電話株式会社 | Communication device or packet transfer method |
| JP5905175B1 (en) * | 2013-02-07 | 2016-04-20 | クアルコム,インコーポレイテッド | Hybrid dynamic-static encoder with optional hit detection and / or multi-hit detection |
-
2001
- 2001-05-09 JP JP2001138243A patent/JP2002335275A/en not_active Withdrawn
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2004068804A1 (en) * | 2003-01-29 | 2004-08-12 | Fujitsu Limited | Packet identification device and packet identification method |
| WO2006072986A1 (en) * | 2005-01-06 | 2006-07-13 | Fujitsu Limited | Associative memory device and routing device using it |
| JP5905175B1 (en) * | 2013-02-07 | 2016-04-20 | クアルコム,インコーポレイテッド | Hybrid dynamic-static encoder with optional hit detection and / or multi-hit detection |
| WO2014125636A1 (en) * | 2013-02-18 | 2014-08-21 | 日本電信電話株式会社 | Communication device or packet transfer method |
| JP5961745B2 (en) * | 2013-02-18 | 2016-08-02 | 日本電信電話株式会社 | Communication device or packet transfer method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6654823B2 (en) | Packet-data processing apparatus | |
| JP4203979B2 (en) | Packet processing device | |
| JP4558879B2 (en) | Data processing apparatus and processing system using table | |
| JP3489573B2 (en) | Packet processing device | |
| US5524250A (en) | Central processing unit for processing a plurality of threads using dedicated general purpose registers and masque register for providing access to the registers | |
| US6434620B1 (en) | TCP/IP offload network interface device | |
| US8040888B1 (en) | Packet switch with port route tables | |
| JP2001094596A (en) | Packet processing apparatus and packet processing method | |
| WO1996034479A1 (en) | Packet switching engine | |
| JP2001251349A (en) | Packet processor | |
| CN110535847B (en) | Network processor and stack processing method of network data | |
| CN114296707A (en) | Programmable hardware logic architecture realized based on P4 language and logic realization method | |
| JP2002538721A (en) | Method and apparatus for classifying network traffic at a high performance network interface | |
| US7058051B2 (en) | Packet processing device | |
| JP3742250B2 (en) | Packet data processing apparatus and packet relay apparatus using the same | |
| JP4342128B2 (en) | Packet processor and packet processor system | |
| JP2002335275A (en) | Packet processing device | |
| US11425036B1 (en) | Pipelined match-action circuitry | |
| JP4209186B2 (en) | A processor configured to reduce memory requirements for fast routing and switching of packets | |
| JP3233353B2 (en) | Header processing device and header processing method | |
| JP3837670B2 (en) | Data relay apparatus, associative memory device, and associative memory device utilization information retrieval method | |
| US7500239B2 (en) | Packet processing system | |
| JP3935021B2 (en) | Packet processing method and apparatus | |
| JPH11205344A (en) | Sar provided with dedicated processing interface | |
| Pnevinatikatos et al. | An efficient, low-cost I/O subsystem for network processors |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20080805 |