JP3233353B2 - Header processing device and header processing method - Google Patents

Header processing device and header processing method

Info

Publication number
JP3233353B2
JP3233353B2 JP1600699A JP1600699A JP3233353B2 JP 3233353 B2 JP3233353 B2 JP 3233353B2 JP 1600699 A JP1600699 A JP 1600699A JP 1600699 A JP1600699 A JP 1600699A JP 3233353 B2 JP3233353 B2 JP 3233353B2
Authority
JP
Japan
Prior art keywords
header
data
packet
sequencer
register
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 - Lifetime
Application number
JP1600699A
Other languages
Japanese (ja)
Other versions
JPH11317783A (en
Inventor
勉 村瀬
正好 小林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP1600699A priority Critical patent/JP3233353B2/en
Publication of JPH11317783A publication Critical patent/JPH11317783A/en
Application granted granted Critical
Publication of JP3233353B2 publication Critical patent/JP3233353B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)
  • Communication Control (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、パケットのヘッダ
処理装置及びヘッダ処理方法に関し、特にパケット転送
用手段を有してパケットを高速に処理するヘッダ処理装
置及びヘッダ処理方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a header processing apparatus and a header processing method for a packet, and more particularly to a header processing apparatus and a header processing method having a packet transfer means for processing a packet at a high speed.

【0002】[0002]

【従来の技術】従来、公衆電話回線はアナログの音声通
信であったが、情報化時代に入ってからデータの通信が
盛んになり、今後益々データの交錯状態が増加し、更に
大量のデータを高速に送信するために、パケット形式
で、伝送されることが多くなっている。
2. Description of the Related Art Conventionally, public telephone lines used to be analog voice communications. However, data communication has become popular since the beginning of the information age. In order to transmit data at high speed, the data is often transmitted in a packet format.

【0003】このパケット形式によるヘッダ処理は、パ
ケットの宛先のある出力インタフェースを求めること
と、該出力インタフェースに適するヘッダに変換するた
めの情報を求めることにある。これらの作業は、ヘッダ
の各種フィールドなどとフォーワーディングテーブルを
用いて行うもので、非常に多数の処理ステップを必要と
する。例えば、マルチレイヤスイッチ(これは物理レイ
ヤの上位レイヤであるレイヤーL2とL3の処理を、1
つの装置あるいはLSIチップにおいて行うスイッチで
ある。)においては、L2のパケット(MACパケッ
ト)のヘッダからMAC(媒体アクセス制御:Media Ac
cess Control)のアドレスを取り出し、下記の4種類の
MACフォーマットのどちらであるかを識別し、識別結
果に応じて決まるヘッダ位置から、L3のパケット(I
Pパケット)を取り出し、IPパケットのヘッダからI
Pのアドレスを取り出す。
[0003] The header processing in the packet format consists in obtaining an output interface having a destination of the packet and in obtaining information for converting to a header suitable for the output interface. These operations are performed using various fields of the header and the forwarding table, and require a very large number of processing steps. For example, a multi-layer switch (which processes layers L2 and L3, which are higher layers of the physical layer,
Switch in one device or LSI chip. )), From the header of the L2 packet (MAC packet), the MAC (Media Access Control: Media Ac
cess Control) address, identifies which of the following four types of MAC formats it is, and from the header position determined according to the identification result, the L3 packet (I
P packet) and extract I from the header of the IP packet.
Take out the address of P.

【0004】さらに、MACアドレスが所定のアドレス
であるかどうかをテスト(ルータテスト)し、そうでな
いときには、L2の処理を行い、所定のアドレスである
ときにはL3の処理を行う。前記識別結果によっては、
L3のパケットを取り出す処理を行わず、L2処理を行
う。ルータテストについて、L2及びL3の処理では、
フォワーディングテーブルを検索するという処理を行
う。このフォワーディングテーブルは一般にかなり大き
いため、この検索処理は非常に時間のかかるものとな
る。
Further, a test is performed to determine whether or not the MAC address is a predetermined address (router test). If not, a process of L2 is performed, and if it is a predetermined address, a process of L3 is performed. Depending on the identification result,
The L2 process is performed without performing the process of extracting the L3 packet. Regarding the router test, in the processing of L2 and L3,
A process of searching a forwarding table is performed. Since this forwarding table is generally quite large, the search process is very time consuming.

【0005】4種類のMACフォーマットとは、図14
に示すように、Ethernet IIとも呼ばれるDIX規定と
IEEE802.3規定という2つの標準形式と、それ
ぞれに802.1Q規定とも呼ばれる仮想LANの識別
子がついているかいないかの2種類との積で4通りであ
る。例えば、DIX規定と802.1Q規定との組合せ
では、IP PDUとVLAN IDとがDIX規定の
単独に対して余分に設定されている。また、LANエミ
ュレーションの標準化の折、そのサービスは既存のイー
サネット及びトークンリンクのLANのアプリケーショ
ンをエミュレートするもので、相互接続・運用の際にM
ACレベルでの接続が必須である。さらに、このMAC
パケットのペイロードとして、IPパケットがあり、さ
らにそのIPパケットのペイロードとして、TCPパケ
ット、UDPパケットのいずれかがある。
[0005] The four types of MAC formats are shown in FIG.
As shown in the above, there are four types of products: two standard formats, DIX standard also called Ethernet II and IEEE 802.3 standard, and two types of whether each has a virtual LAN identifier also called 802.1Q standard. is there. For example, in the combination of the DIX rule and the 802.1Q rule, the IP PDU and the VLAN ID are set extra than the DIX rule alone. When LAN emulation is standardized, the service emulates the existing Ethernet and token link LAN applications.
Connection at the AC level is mandatory. Furthermore, this MAC
An IP packet is a payload of the packet, and a payload of the IP packet is any of a TCP packet and a UDP packet.

【0006】このようにパケットヘッダは、それを順に
解析して始めて、内容フォーマットが明らかになるもの
であるため、ヘッダ解析前のパケット受信時には、パケ
ットヘッダがどこまでなのかは不明である。しかし、取
り扱うプロトコルは定まっているため、最大のヘッダを
想定して、この部分つまり、ヘッダを必ず含むようなパ
ケットの一部分(ヘッダ可能性部分と呼ぶ)をパケット
から取り出しておけば、不要な情報が含まれている可能
性はあるが、必要な情報を取りこぼすことはない。さら
に、検索結果を適当に加工して、パケットを宛先に送出
する準備を行う必要がある。この準備には、パケットを
宛先行きの待ち行列に加える、パケットヘッダを書き換
える、パケットをコピーするなどの処理がある。
[0006] As described above, since the content format of the packet header is clarified only by analyzing the packet header in order, it is unknown at the time of packet reception before the header analysis how much the packet header is. However, since the protocol to be handled is fixed, if the maximum header is assumed and this part, that is, a part of the packet that always includes the header (called a header possibility part) is extracted from the packet, unnecessary information is obtained. May be included, but the necessary information is not lost. Furthermore, it is necessary to appropriately process the search result and prepare for sending the packet to the destination. This preparation includes processes such as adding a packet to a queue for a destination, rewriting a packet header, and copying a packet.

【0007】以上のようなヘッダ処理を1つのCPUで
順に行うことで、1つのパケットの処理が終了する。高
速化を図るためには、この処理を高速に行う必要があ
る。
The above-described header processing is sequentially performed by one CPU, thereby completing the processing of one packet. In order to increase the speed, it is necessary to perform this processing at high speed.

【0008】また、汎用のCPUを用いた場合には、論
理回路で構成したハードウエアでは、1ステップ、つま
り1クロックで実行できる機能を、2クロック以上必要
とすることがある。
[0008] When a general-purpose CPU is used, hardware constituted by a logic circuit may require a function that can be executed in one step, that is, one clock, for two or more clocks.

【0009】例えば、ハードウエア論理回路において、
メモリAとメモリBの内容を2倍したものの加算を行
い、メモリCに保存する(C=2×A+2×B)には、
1クロック目でメモリA,Bを同時に読み出してレジス
タに入れ、2クロック目でそのレジスタを1ビットシフ
トしながら(2倍化)、加算し、その結果をメモリCに
書き込むことができる(特殊演算と呼ぶ)。
For example, in a hardware logic circuit,
To add twice the contents of memory A and memory B and store them in memory C (C = 2 × A + 2 × B),
At the first clock, the memories A and B are simultaneously read out and put into the registers. At the second clock, the registers are shifted by one bit (doubling), added, and the result can be written into the memory C (special operation). ).

【0010】一方、汎用CPUの場合には、加算やシフ
トといった最も基本的な演算(基本演算と呼ぶ)を用い
て、メモリAをレジスタに読み出し(1クロック目)、
メモリBをレジスタに読み出し(2クロック目)、メモ
リAのレジスタを1ビットシフトして(3クロック
目)、メモリBのレジスタを1ビットシフトして(4ク
ロック目)、メモリAのレジスタとBのレジスタを加算
して(5クロック目)、結果をメモリCに書き込む(6
クロック目)ことになる。
On the other hand, in the case of a general-purpose CPU, the memory A is read into a register by using the most basic operation such as addition and shift (referred to as a basic operation) (first clock), and
The memory B is read into the register (second clock), the register of the memory A is shifted by one bit (third clock), and the register of the memory B is shifted by one bit (fourth clock). (5th clock), and write the result to the memory C (6
Clock eye).

【0011】この例で示すように、前者は2クロック
で、後者は6クロックを要し、論理回路で構成したハー
ドウエアは、汎用CPUよりも高速に処理ができる。た
だし、ハードウエア論理回路は、修正変更や将来の機能
追加が困難である。そのため、ハードウエア論理回路は
設計変更の柔軟性に欠ける。従来、ハードウエア論理回
路におけるこの柔軟性を欠くという欠点を改善するため
にシーケンサというプログラマブルな専用CPUを用い
る方法があり、信号処理などの分野で使用されていた。
As shown in this example, the former requires two clocks and the latter requires six clocks, and hardware constituted by a logic circuit can process at higher speed than a general-purpose CPU. However, it is difficult to modify or change the hardware logic circuit or add a function in the future. Therefore, the hardware logic circuit lacks flexibility in design change. Conventionally, there has been a method of using a programmable dedicated CPU called a sequencer in order to improve the disadvantage of lacking flexibility in a hardware logic circuit, which has been used in fields such as signal processing.

【0012】シーケンサも汎用CPUも、一般に、RO
M/RAMに入れられたプログラムを持ち、プログラム
カウンタと呼ばれるポインタが指し示すアドレスの内容
(命令)が取り出され、命令が解読(デコード)され、
デコード信号が出され、デコード信号を受けた演算回路
が動作するというものである。
Both the sequencer and the general-purpose CPU generally have RO
Having a program stored in the M / RAM, the contents (instructions) of the address pointed to by a pointer called a program counter are extracted, and the instructions are decoded (decoded).
A decode signal is output, and an arithmetic circuit receiving the decode signal operates.

【0013】しかしながら、シーケンサでは、演算回路
が専用に作られており、例えば、レジスタAとレジスタ
Bの内容をそれぞれ2倍して加算するという演算を、1
クロックで行なうような演算を組み込むことができる。
従って、汎用CPUよりも高速に演算が行われる。信号
処理のシーケンサでは、X,Yを変数とし、A,Bを媒
介変数とする、Y=AX+B等の一次関数の演算が演算
回路として組まれている。しかしながら、パケットのヘ
ッダを処理するためのシーケンサはなかった。
However, in the sequencer, the arithmetic circuit is specially made. For example, the operation of doubling the contents of the registers A and B and adding the contents is one.
An operation such as that performed by a clock can be incorporated.
Therefore, the calculation is performed faster than the general-purpose CPU. In a signal processing sequencer, a calculation of a linear function such as Y = AX + B using X and Y as variables and A and B as parameters is set as an arithmetic circuit. However, there was no sequencer to process the header of the packet.

【0014】[0014]

【発明が解決しようとする課題】上記従来技術の第1の
問題点は、ヘッダ処理において、順序よく行うべきこと
と、同時並行的に(独立に)行うことが可能ではある
が、汎用CPUにおいては、すべて順に行われていたこ
とにある。従って、高速化を図るには汎用CPUの能力
を上げる必要があるが、能力を上げることは、汎用CP
Uそのものの性能アップのため、コスト高につながる。
The first problem of the above-mentioned prior art is that header processing can be performed in an orderly manner and can be performed concurrently (independently) in a header processing. , All that had been done in order. Therefore, to increase the speed, it is necessary to increase the capacity of the general-purpose CPU.
Because the performance of U itself is improved, the cost is increased.

【0015】また、汎用CPUを多数用意し、パイプラ
イン処理を行う場合には、適当なパイプライン数に設計
しなければ、やはりコスト高になる。あるいはフォワー
ディングテーブルのような資源がボトルネックになり、
汎用CPUが能力を十分活かせなくなる恐れがある。
Further, when a large number of general-purpose CPUs are prepared and pipeline processing is performed, unless the number of pipelines is designed appropriately, the cost will increase. Or resources like forwarding tables become bottlenecks,
There is a possibility that the general-purpose CPU cannot make full use of its capabilities.

【0016】また、第2の問題点は、汎用CPUのかわ
りにハードウエア論理回路を用いた場合には、設計変更
の柔軟性に欠けるという問題がある。これに対し、シー
ケンサというプログラマブルな専用CPUを用いる方法
があり、信号処理などの分野で使用されていた。しかし
ながら、パケットのヘッダ処理を高速に行なうためのこ
のようなシーケンサは、いまだ公開されていない。
The second problem is that when a hardware logic circuit is used in place of a general-purpose CPU, there is a lack of flexibility in design change. On the other hand, there is a method using a programmable dedicated CPU called a sequencer, which has been used in fields such as signal processing. However, such a sequencer for performing packet header processing at high speed has not been disclosed yet.

【0017】[発明の目的]本発明は、ボトルネックに
なるフォワーディングテーブルのような資源で制約され
る速度まで、パケット等のヘッダ処理の高速化を汎用C
PUを用いて低コストで行うことを目的とする。また、
パケットヘッダ処理をプログラマブルなハードウエア論
理回路、即ちシーケンス処理で実現することで、高速性
を保ちながら、設計変更や将来の機能追加を低コストで
実現することを目的とする。
The object of the present invention is to increase the speed of header processing of packets and the like up to a speed restricted by resources such as a forwarding table which becomes a bottleneck.
It is intended to be performed at low cost using a PU. Also,
It is an object of the present invention to realize a design change or a future function addition at a low cost while maintaining high speed by realizing packet header processing by a programmable hardware logic circuit, that is, sequence processing.

【0018】[0018]

【課題を解決するための手段】上記目的を達成するため
に、本発明は、パケットから抽出されたヘッダを含むパ
ケットの一部分から、プロトコルヘッダの各フィールド
のデータを抽出し、指定された記憶場所に入力する第1
の手段と、該指定された記憶場所のデータを検索キーに
して検索を行い、該検索キーに一致するテーブルエント
リの内容を出力する第2の手段と、該第2の手段の出力
内容と前記記憶場所のデータとから、前記パケットの送
出先とヘッダ更新情報の属性情報を作成する第3の手段
、を有し、 前記第1〜第3の各手段は、それぞれあら
かじめ決められた固定時間の始まりあるいは終わりに、
現固定時間内に、あるいは次の固定時間内にどの処理プ
ログラムを実行するかを、決定することを特徴とする
ッダ処理装置を提供するものである。また本発明は、パ
ケットから抽出されたヘッダを含むパケットの一部分か
ら、プロトコルヘッダの各フィールドのデータを抽出
し、指定された記憶場所に入力する第1の手段と、該指
定された記憶場所のデータを検索キーにして検索を行
い、該検索キーに一致するテーブルエントリの内容を出
力する第2の手段と、該第2の手段の出力内容と前記記
憶場所のデータとから、前記パケットの送出先とヘッダ
更新情報の属性情報を作成する第3の手段と、を有し、
前記第1〜第3の各手段は、それぞれあらかじめ決めら
れた命令数の整数倍で処理を終了し、処理終了時あるい
は開始時に、他の手段の処理の終了あるいは開始を確認
し、少なくとも他の1つの手段において終了あるいは開
始が確認できない場合には、命令の実行を一時停止し、
全手段が処理の終了あるいは開始状態になるのを待つこ
とを特徴とするヘッダ処理装置を提供するものである。
また本発明は、パケットから抽出されたヘッダを含むパ
ケットの一部分から、プロトコルヘッダの各フィールド
のデータを抽出し、指定された記憶場所に入力する第1
の手段と、該指定された記憶場所のデータを検索キーに
して検索を行い、該検索キーに一致するテーブルエント
リの内容を出力する第2の手段と、該第 2の手段の出力
内容と前記記憶場所のデータとから、前記パケットの送
出先とヘッダ更新情報の属性情報を作成する第3の手段
と、を有し、 前記第1の手段における記憶場所として、
1つの共用部分と2つの個別部分を有し、該共用部分
は、一部あるいは全てのフィールドデータを前記第2の
手段と前記第3の手段で共用して使用するような記憶場
所として用い、前記個別部分は、各個別部分に同一内容
のデータを持ち且つ各個別部分のそれぞれを、前記第2
の手段と、前記第3の手段で独立に用いることを特徴と
するヘッダ処理装置を提供するものである。
In order to achieve the above object, the present invention extracts data of each field of a protocol header from a part of a packet including a header extracted from the packet, and stores the data in a designated storage location. First to enter
Means, performs a search in the data search key of the specified storage location, a second means for outputting the contents of the table entry that matches the search key, and outputs the contents of the second means the And third means for creating attribute information of the header update information from the destination of the packet from the data of the storage location , wherein the first to third means are respectively
At the beginning or end of a predetermined fixed time,
Which processing plan is within the current fixed time or within the next fixed time
It is an object of the present invention to provide a header processing device for determining whether to execute a program . In addition, the present invention
Part of the packet containing the header extracted from the packet
Extract the data of each field of the protocol header
First means for inputting to a designated storage location;
Performs a search using the data in the specified storage location as a search key.
Output the contents of the table entry that matches the search key.
Second means for inputting, and the output contents of the second means and the
From the data in the storage location, the destination of the packet and the header
And third means for creating attribute information of the update information.
The first to third means are each determined in advance.
Processing ends at an integral multiple of the number of instructions
Confirms completion or start of processing of other means at the start
Terminate or open in at least one other means.
If the start cannot be confirmed, execution of the instruction is suspended,
Wait for all means to end or start processing.
And a header processing device characterized by the following.
The present invention also provides a packet including a header extracted from a packet.
Each field of the protocol header from a portion of the
The first to extract the data of the data and input it to the specified storage location
And the data at the designated storage location as a search key
Search, and find the table entry that matches the search key.
Second means for outputting the re contents, the output of the second means
From the contents and the data in the storage location, the packet transmission
Third means for creating attribute information of destination and header update information
And, as the storage location in the first means,
Having one common part and two separate parts, the common part
Converts some or all of the field data into the second
Storage space that is shared by the means and the third means
The individual parts are the same as each individual part.
And each of the individual parts is stored in the second
And the third means are used independently.
This is to provide a header processing device that performs

【0019】また本発明はパケットから抽出されたヘ
ッダを含むパケットの一部分から、プロトコルヘッダの
各フィールドのデータを抽出し、指定された記憶場所に
入力する第1の手順と、該指定された記憶場所のデータ
を検索キーにして検索を行い、前記検索キーに一致する
テーブルエントリの内容を出力する第2の手順と、該第
2の手順の出力内容と前記記憶場所のデータとから、前
記パケットの送出先とヘッダ更新情報の属性情報を作成
する第3の手順と、を有し、 前記第1〜第3の各手順
は、それぞれあらかじめ決められた固定時間の始まりあ
るいは終わりに、現固定時間内に、あるいは次の固定時
間内にどの処理プログラムを実行するかを、決定する
ッダ処理方法を提供するものである。
According to the present invention , a first step of extracting data of each field of a protocol header from a part of a packet including a header extracted from the packet and inputting the data to a designated storage location, A second procedure of performing a search using the data of the storage location as a search key and outputting the contents of a table entry that matches the search key; and, based on the output content of the second procedure and the data of the storage location, possess a third step in creating the attribute information of the destination and the header update information of the packet, and the first to third individual steps
Is the beginning of a predetermined fixed time
At the end or at the current fixed time or at the next fixed time
The present invention provides a header processing method for determining which processing program is to be executed in a short time.

【0020】[作用]パケットのヘッダ処理には、処理
時間に注目すると主に以下の3つの処理が大半を占め
る。すなわち、第1の処理として、パケットのヘッダの
構造を明らかにし、ヘッダの書くフィールドを抽出する
こと、第2の処理として、アドレスフィールドの情報、
つまりアドレスからパケットの行き先を決定すること、
第3の処理として、パケットの行き先へパケットを送出
するのに必要なヘッダ変換を行うことである。
[Operation] In the packet header process, the following three processes mainly occupy most of the processing time. That is, as a first process, the structure of the header of a packet is clarified, and a field to be written in the header is extracted. As a second process, information of an address field,
In other words, determining the destination of the packet from the address,
The third process is to perform header conversion necessary for sending the packet to the destination of the packet.

【0021】かかる処理を行うCPUの構成概念図を図
5に示す。CPUによる場合、CPU10内には加算器
(+)と乗算器(×)とレジスタR1,R2,R3と命
令デコーダとから成り、バスラインを介してCPU10
の基本ソフトのOS11とプログラム12とから構成さ
れる。かかる構成の場合、プログラム12の内容の例に
よれば、A〜Dの数値と各レジスタとから、3A+3B
=Dを得るのに9ステップを要しているが、コストパフ
ォーマンスとしては申し分ない。
FIG. 5 is a conceptual diagram showing the configuration of a CPU for performing such processing. In the case of the CPU, the CPU 10 includes an adder (+), a multiplier (×), registers R1, R2, R3, and an instruction decoder.
And an operating system OS 11 and a program 12. In the case of such a configuration, according to the example of the contents of the program 12, 3A + 3B
It takes 9 steps to get = D, but it is perfect for cost performance.

【0022】また、専用のシーケンスによる構成概念図
を図2に示す。専用のシーケンスとしては、命令デコー
ダを有するシーケンサ20と、機能処理F1(21),
F2(22)と、シーケンサ20が動作する手順を格納
するプログラム23とから構成される。かかる構成の場
合、専用の機能処理手段を有しているので、図5と同様
な結果を得るために、2ステップでよく、高速化のため
に優れている。
FIG. 2 is a conceptual diagram of a configuration based on a dedicated sequence. As a dedicated sequence, a sequencer 20 having an instruction decoder, function processing F1 (21),
F2 (22) and a program 23 for storing a procedure for operating the sequencer 20. In the case of such a configuration, since dedicated function processing means is provided, two steps are required to obtain a result similar to that of FIG. 5, and it is excellent for speeding up.

【0023】さらに、本発明により、パケットヘッダの
一連の第1〜第3の処理をパイプライン的に行うため
に、順に行うことが必要な前記3つの部分に分け、なお
かつボトルネックになる資源の使用を最小限にとどめ、
なおかつ該資源を使用するCPUが100%稼動するよ
うな分割とし、各部分では、それぞれのCPUを割り当
てて独立に処理を行うことができる。これにより、最適
なCPU数が選択でき、最も負荷がかかるCPUを10
0%あるいは100%近くまで活用することができる。
Further, according to the present invention, in order to perform a series of first to third processes of the packet header in a pipeline manner, the packet header is divided into the above three portions which need to be performed in sequence, Minimize use,
In addition, CPUs using the resources are divided so that the CPUs operate 100%, and the respective parts can be independently processed by allocating the respective CPUs. As a result, the optimal number of CPUs can be selected, and the CPU with the highest load is set
It can be used up to 0% or nearly 100%.

【0024】また、高速にパケットヘッダの処理を行う
にはこれらを高速に行う必要がある。従来は、1つのC
PUが上記3処理を順に行っていたが、ハードウエアで
同様のことを行う場合、3処理を別々に行うことで、パ
イプライン処理が可能となる。
In order to process packet headers at high speed, it is necessary to perform these at high speed. Conventionally, one C
Although the PU performs the above three processes in order, if the same is performed by hardware, the pipeline process can be performed by separately performing the three processes.

【0025】かかるパイプライン的な構成による処理の
概念的な例を図3に示す。処理Aと処理B,処理Cとは
同一の固定時間で処理が終わり、スタートしてから終了
するまでも固定時間に設定されており、一連の処理が必
要な場合、同一の固定時間で処理可能な処理Aと処理
B,処理Cとがあり、CPU1で処理Aが終了してから
CPU2で処理Bが開始されるとともにCPU1で次の
処理Aが開始される、CPU2で処理Bが終了してから
CPU3で処理Cが開始されるとともにCPU2で次の
処理Bが開始されるような処理をパイプライン的な処理
と称している。
FIG. 3 shows a conceptual example of the processing by such a pipeline configuration. The processing A, the processing B, and the processing C are completed in the same fixed time, and are set to a fixed time from the start to the end, and when a series of processing is required, the processing can be performed in the same fixed time. Process A, process B, and process C. After the process A is completed by the CPU 1, the process B is started by the CPU 2 and the next process A is started by the CPU 1, and the process B is completed by the CPU 2. The process in which the process C is started by the CPU 3 and the next process B is started by the CPU 2 is called a pipeline process.

【0026】また、処理A〜Cが同一の固定時間で処理
が終わらない場合に、プログラム処理する際には、種々
な方式があり、その3例を図4に示して説明する。ここ
では、CPUをシーケンサに置き換えて説明する。図4
(a)は各処理の時間が異なる場合、処理プログラムA
41が処理プログラムB42より短いとき、処理プログ
ラムB42が終了するまでレジスタ43の処理プログラ
ムB42に対応するフラグが立たないので、処理プログ
ラムA41を処理するシーケンサ1は待ち受け状態と
し、処理プログラムB42が終了してレジスタ43のフ
ラグが立って、シーケンサ1は続く処理プログラムAを
処理する。また、図4(b)では、処理プログラムA4
1が処理プログラムB42より短いとき、シーケンサ1
は処理プログラムA41が終了してから所定の一定時間
を待って、レジスタ43の処理プログラムB42に対応
するフラグが立っているのかどうかを検出し、フラグが
立った場合は次の処理プログラムA41を処理する。一
方、フラッグが立っていない場合は所定の一定時間を待
ち、再度、レジスタ43の処理プログラムB42に対応
するフラグが立っているのかどうかを検出する。即ち、
待ち受け状態に一定時間を設定しておくことで、シーケ
ンサ1の負担を軽減している。さらに、図4(c)で
は、処理プログラムA41が処理プログラムB42より
短いとき、所定の一定クロック数毎に、シーケンサ1が
レジスタ43の処理プログラムB42に対応するフラグ
が立っているのかどうかを検出するもので、所定の一定
クロック数の複数倍毎にフラグを検出することで、更に
シーケンサの負担を軽減することができる。
There are various methods for performing program processing when the processing A to C does not end in the same fixed time, and three examples will be described with reference to FIG. Here, the description will be made with the CPU replaced with a sequencer. FIG.
(A) shows processing program A when the time of each processing is different.
When 41 is shorter than the processing program B42, since the flag corresponding to the processing program B42 in the register 43 is not set until the processing program B42 ends, the sequencer 1 that processes the processing program A41 is in a standby state, and the processing program B42 ends. Then, the flag of the register 43 is set, and the sequencer 1 processes the subsequent processing program A. In FIG. 4B, the processing program A4
1 is shorter than the processing program B42, the sequencer 1
Waits for a predetermined period of time after the processing program A41 ends, detects whether a flag corresponding to the processing program B42 of the register 43 is set, and if the flag is set, processes the next processing program A41. I do. On the other hand, if the flag is not set, a predetermined period of time is waited, and it is detected again whether the flag corresponding to the processing program B42 of the register 43 is set. That is,
By setting a certain period of time in the standby state, the load on the sequencer 1 is reduced. Further, in FIG. 4C, when the processing program A41 is shorter than the processing program B42, the sequencer 1 detects whether or not a flag corresponding to the processing program B42 in the register 43 is set at a predetermined constant clock number. In this case, the load on the sequencer can be further reduced by detecting the flag at every multiple of a predetermined fixed number of clocks.

【0027】[0027]

【発明の実施の形態】次に、本発明の実施の形態につい
て図面を参照して詳細に説明する。
Next, embodiments of the present invention will be described in detail with reference to the drawings.

【0028】<第1の実施形態>本発明の第1の実施形
態は、図1に示すように、第1〜第3の手段となる3つ
の汎用CPUと各種レジスタから構成される。CPU
(前処理)と名づけられた第1の汎用CPU101は、
ヘッダレジスタ群(単にヘッダレジスタと称する)12
0の情報から、検索キーレジスタ群(単に検索キーレジ
スタと呼ぶ)121の内容を生成する。
<First Embodiment> A first embodiment of the present invention comprises, as shown in FIG. 1, three general-purpose CPUs serving as first to third means and various registers. CPU
The first general-purpose CPU 101 named (pre-processing)
Header register group (simply called header register) 12
From the information of 0, the contents of a search key register group (simply called a search key register) 121 are generated.

【0029】CPU(検索(サーチ)/学習エンジン)
と名づけられた第2の汎用CPU102は、検索キーレ
ジスタ121の情報からフォワーディングテーブル10
9を検索し、検索結果により検索結果レジスタ群(単に
検索結果レジスタと呼ぶ)122を生成する。
CPU (search / learning engine)
The second general-purpose CPU 102 named “forwarding table 10
9 is searched, and a search result register group (simply called a search result register) 122 is generated based on the search result.

【0030】さらに、CPU(後処理)と名づけられた
第3の汎用CPU103は、検索結果レジスタ122の
情報からキューバッファ準備レジスタ群(単にキューバ
ッファ準備レジスタと呼ぶ)123の内容を生成する。
Further, a third general-purpose CPU 103 named CPU (post-processing) generates the contents of a queue buffer preparation register group (simply called a queue buffer preparation register) 123 from the information of the search result register 122.

【0031】ヘッダレジスタ120とキューバッファ準
備レジスタ123は、受信インタフェース数、すなわち
同時にパケットが到着する数Nだけ必要である。検索結
果レジスタ122は、1つしかないフォワーディングテ
ーブル109の検索に関係するので、N以下でよいが、
任意の1つのレジスタのアクセスを2つの汎用CPUが
同時に行わないという制約のもとで動作させるため、3
つ必要である。
The header register 120 and the queue buffer preparation register 123 need the number of reception interfaces, that is, the number N of packets arriving at the same time. Since the search result register 122 relates to the search of the forwarding table 109 having only one, the search result register 122 may be N or less.
To operate under the restriction that two general-purpose CPUs do not access any one register at the same time, 3
Is necessary.

【0032】その3つの検索結果レジスタ122は、そ
れぞれ、前処理汎用CPU101の書き込み、サーチ/
学習エンジン102の書き込み、後処理汎用CPU10
3の読み取りに同時に使用される。この検索結果レジス
タ122と対応させて制御させるため、検索キーレジス
タ121も3つ用意する。ただし、検索キーレジスタ1
21においては、その2つは、それぞれ、前処理汎用C
PU101の書き込み、検索エンジン102の読み取り
に同時に使用され、1つは休止となる。
The three search result registers 122 store the write and search /
Writing and post-processing general-purpose CPU 10 for learning engine 102
3 are used simultaneously. Three search key registers 121 are also prepared in order to control the search result register 122. However, search key register 1
21, the two are respectively pre-processing general-purpose C
It is used at the same time for writing of the PU 101 and reading of the search engine 102, and one of them is paused.

【0033】以下、3つの汎用CPUについて説明す
る。パケットあたりの処理において、検索/学習エンジ
ン102がフォワーディングテーブル109の検索に時
間がかかるため、もっともボトルネックとなる。また、
この時間をできるだけ短縮するために、検索回数を最小
限にするための処理を前処理汎用CPU101と後処理
汎用CPU103に任せる。
Hereinafter, three general-purpose CPUs will be described. In the processing per packet, the search / learning engine 102 takes a long time to search the forwarding table 109, and thus becomes the bottleneck most. Also,
In order to reduce this time as much as possible, processing for minimizing the number of searches is left to the pre-processing general-purpose CPU 101 and the post-processing general-purpose CPU 103.

【0034】前処理と後処理のそれぞれの汎用CPU1
01,103の処理を説明する。前処理汎用CPU10
1は、ヘッダ解析を行い、MACパケットのヘッダフォ
ーマットの決定および必要に応じて、MACパケットの
ぺイロード、つまりIPパケットのヘッダ解析を行う。
MACパケットのペイロードは必ずしもIPパケットで
はない。これは、MACアドレスがルータのMACアド
レスであれば、該パケットはIPパケットとしてレイヤ
ーL3を処理し、そうでなければIPパケットであるか
どうかを調べる必要はなく、レイヤーL2の処理を行
う。従来の技術では、MACアドレスがルータ宛てのM
ACアドレスかどうかは、フォワーディングテーブル1
09を検索していた。しかし、これは検索エンジン10
2の負荷になるので、この前処理汎用CPU101に
て、その判定を行う。
General-purpose CPU 1 for each of pre-processing and post-processing
The processing of 01 and 103 will be described. Pre-processing general-purpose CPU 10
1 performs header analysis, determines the header format of the MAC packet, and, if necessary, performs the payload of the MAC packet, that is, performs the header analysis of the IP packet.
The payload of a MAC packet is not necessarily an IP packet. That is, if the MAC address is the MAC address of the router, the packet is processed as a layer L3 as an IP packet. Otherwise, it is not necessary to check whether the packet is an IP packet, and the layer L2 is processed. In the conventional technology, the MAC address is set to M
Whether it is an AC address or not is determined by the forwarding table 1
09 was searched. But this is the search engine 10
Since the load is 2, the preprocessing general-purpose CPU 101 makes the determination.

【0035】また、判定でルータ宛先の解析が必要で、
つまりL3の処理を行う必要がある場合には、IPパケ
ットのヘッダの解析に入る。IPヘッダについては、宛
先IPアドレスを抽出し、それを検索キーとして検索キ
ーレジスタ121に入力する。また、受信ポート番号や
VLAN−IDといった情報は、検索キーレジスタ12
1に書き込むとともに検索結果レジスタ122にも書き
込む。これらの情報は、キューバッファ準備レジスタ1
23への書き込み時にも必要だからである。
In addition, it is necessary to analyze the router destination in the judgment,
That is, when the processing of L3 needs to be performed, the analysis of the header of the IP packet is started. As for the IP header, a destination IP address is extracted and input to the search key register 121 as a search key. Information such as the reception port number and the VLAN-ID is stored in the search key register 12.
1 as well as the search result register 122. These information are stored in the queue buffer preparation register 1
This is because it is also necessary when writing to.

【0036】後処理汎用CPU103は、検索結果レジ
スタ122の受信ポート番号と一致する番号のレジスタ
を指定するとともに、検索エンジン102により検索結
果レジスタ122に入力された検索結果をキュー準備レ
ジスタ123において指定されたフォーマットに変換す
る。例えば、宛先がマルチキャストである場合には、検
索エンジン102は、フォワーディングテーブル109
から、ビットマップを引き出してきて、それを検索結果
レジスタ122に入力するので、それを後処理汎用CP
U103が、そのビットマップを解析し、ビットのon
/offをそのビットに対応する出力ポートへのパケッ
ト送出という命令列に変換する。
The post-processing general-purpose CPU 103 specifies a register having a number that matches the reception port number of the search result register 122, and specifies the search result input to the search result register 122 by the search engine 102 in the queue preparation register 123. To the specified format. For example, if the destination is multicast, the search engine 102
, A bit map is extracted from the search result register 122 and input to the search result register 122.
U103 analyzes the bitmap and turns on the bit.
/ Off is converted into an instruction sequence of sending a packet to an output port corresponding to the bit.

【0037】検索/学習エンジン102は、検索キーレ
ジスタ121に入力された検索キーと、L2であるかL
3であるかどちらの処理を行うべきかを示す情報を用い
て、それに対応するフォワーディングテーブル109を
検索する。検索により、キーと一致するものが発見され
た場合には、そのテーブル内で発見されたキーに結合さ
れている情報を引き出す。該情報としては、出力ポート
番号、出力時に変更すべきアドレスフィールド名と、変
更に用いるアドレス、などが含まれている。
The search / learning engine 102 determines whether the search key input to the search key register 121 is L2 or L2.
Using the information indicating whether the processing is 3 or which processing should be performed, the corresponding forwarding table 109 is searched. If the search finds a match with the key, the information associated with the found key in the table is extracted. The information includes an output port number, an address field name to be changed at the time of output, an address used for the change, and the like.

【0038】以上のように3つの汎用CPUにより独立
に処理を行うことで、一つの汎用CPUで処理を行う場
合に問題になる高速化の限界を超えることができる。ま
た、汎用CPUを4つ以上使用する必要がなく、3つで
十分に処理を分散することができる。
As described above, by performing processing independently by three general-purpose CPUs, it is possible to exceed the limit of speeding up which is a problem when processing is performed by one general-purpose CPU. Further, it is not necessary to use four or more general-purpose CPUs, and three can sufficiently distribute processing.

【0039】なお、上記実施形態では、処理の一部は前
処理を経過して行う処理が必要であるが、重複して処理
を行うことができるので、図5に示したCPUによりシ
ーケンス的にパケット処理の高速化が達成できる。
In the above-described embodiment, a part of the processing requires the processing to be performed after the preprocessing. However, since the processing can be performed in an overlapping manner, the CPU shown in FIG. High-speed packet processing can be achieved.

【0040】<第2の実施形態>本発明の第2の実施形
態は、第1の実施形態における各汎用CPUの代わりに
シーケンサを用いる構成である。これにより、汎用CP
Uを用いた場合よりもさらに高速化できる。図6にシー
ケンサによる処理の例を示している。シーケンサの動作
及びシーケンサの構成は、図2に示したものであり、本
実施形態による動作は、図1に示した第1の実施形態と
同様なので、説明を省略する。なお、処理ステップが機
能処理により極めて短時間で処理することが可能であ
る。
<Second Embodiment> A second embodiment of the present invention has a configuration in which a sequencer is used instead of each general-purpose CPU in the first embodiment. Thereby, general purpose CP
The speed can be further increased as compared with the case where U is used. FIG. 6 shows an example of processing by the sequencer. The operation of the sequencer and the configuration of the sequencer are as shown in FIG. 2, and the operation according to this embodiment is the same as that of the first embodiment shown in FIG. The processing steps can be performed in a very short time by functional processing.

【0041】<第3の実施形態>本発明の第3の実施形
態は、第1あるいは第2の実施形態において、各CP
U、又は各シーケンサがパイプラインとして動作し、以
下のような構造を持つものである。図7は各シーケンサ
がパイプラインとして動作する場合を示す図である。
<Third Embodiment> A third embodiment of the present invention is different from the first or second embodiment in that each CP
U or each sequencer operates as a pipeline and has the following structure. FIG. 7 is a diagram showing a case where each sequencer operates as a pipeline.

【0042】各シーケンサ101,102,103は、
固定時間でその処理を終わるように固定時間(周期)を
決めてある。システムを動作開始させるときに、同一の
タイミングで信号が出るような周期そろえクロックを周
期タイマ201から、シーケンサ101,102,10
3に同時に入力することで、周期の始まりを同一にす
る。これにより各シーケンサにおける処理は、次の手段
のことを考慮せずに独立に動作することが可能となる。
図7において、シーケンサに代えて汎用CPUを用いる
ことも可能である。
Each sequencer 101, 102, 103
A fixed time (period) is determined so that the processing is completed in a fixed time. When starting the operation of the system, the cycle timer 201 supplies a cycle aligning clock from the cycle timer 201 so that a signal is output at the same timing.
By simultaneously inputting the values to 3, the start of the cycle is made the same. As a result, the processing in each sequencer can operate independently without considering the following means.
In FIG. 7, a general-purpose CPU can be used instead of the sequencer.

【0043】これにより、汎用CPUあるいはシーケン
サ制御において、汎用CPU間の連絡に必要な手続きが
削除でき、或いは各シーケンサ間の連絡に必要な手続き
が削除できるので、その分を本来の処理に向けることが
でき、さらなる高速化がはかれる。
As a result, in the general-purpose CPU or the sequencer control, the procedure necessary for communication between the general-purpose CPUs can be deleted, or the procedure necessary for communication between the sequencers can be deleted. And speedup is further improved.

【0044】<第4の実施形態>本発明の第4の実施形
態は、図6の第2の実施形態において、図8に示すよう
に、以下のような構造を持つものである。
<Fourth Embodiment> A fourth embodiment of the present invention has the following structure as shown in FIG. 8 in the second embodiment of FIG.

【0045】各レジスタ群120〜123は、それぞれ
処理を行なうために必要なデータ、すなわち処理の入力
データがあるかどうかを示す第1のレディレジスタをそ
れぞれ持つ。即ち、各レジスタ群120〜123の各レ
ジスタ120a〜120c,121a〜121c,12
2a〜122c,123a〜123cはそれぞれレディ
レジスタ301,302,303を持っている。さら
に、各レジスタ群120〜123は、処理の結果を出力
するための記憶場所が使用できるかどうか、すなわち前
パケットのヘッダ処理の結果が、次の手段で入力として
使用済みかどうかを示す第2のレディレジスタをそれぞ
れ持つ。即ち、各レジスタ群120〜123の各レジス
タ120a〜120c,121a〜121c,122a
〜122c,123a〜123cはそれぞれレディレジ
スタ401,402,403を持っている。
Each of the register groups 120 to 123 has a first ready register which indicates whether there is data necessary for performing the process, that is, whether there is input data for the process. That is, each of the registers 120a to 120c, 121a to 121c, 12
2a to 122c and 123a to 123c have ready registers 301, 302, and 303, respectively. Further, each of the register groups 120 to 123 indicates whether or not a storage location for outputting the processing result can be used, that is, whether or not the result of the header processing of the previous packet has been used as an input by the following means. Each has a ready register. That is, each of the registers 120a to 120c, 121a to 121c, and 122a of each of the register groups 120 to 123.
122c and 123a to 123c have ready registers 401, 402 and 403, respectively.

【0046】以下、上記構造の動作について説明する。The operation of the above structure will be described below.

【0047】例えば、シーケンサ102は、処理の最初
において、読み出し側レジスタ群(検索キーレジスタ
群)121の第1のレジスタ121aの第1のレディレ
ジスタ301と書き込み側レジスタ群(検索結果レジス
タ群)122のレジスタ122aの第2のレディレジス
タ401を常に読み出し、第1のレディレジスタ301
が「入力データあり」の場合で、かつ、第2のレディレ
ジスタ401が「書き込みOK」の場合にのみ、読み出
し側レジスタ群121のレジスタ121aからデータを
読み、データ処理して書き込み側レジスタ群122のレ
ジスタ122aにデータを書き込む。その後、読み出し
側レジスタ群121のレジスタ121aの第2のレディ
レジスタ401に「書き込みOK」をセットし、書き込
み側レジスタ群122のレジスタ122aの第1のレデ
ィレジスタ301に「入力データあり」をセットする。
さらに、読み出し側レジスタ群121のレジスタ121
aの第1のレディレジスタ301に「入力データなし」
をセットし、書き込み側レジスタ群122のレジスタ1
22aの第2のレディレジスタ401に「書き込み禁
止」をセットする。
For example, at the beginning of the process, the sequencer 102 firstly registers the first ready register 301 of the first register 121 a of the read-side register group (search key register group) 121 and the write-side register group (search result register group) 122. , The second ready register 401 of the register 122a is always read, and the first ready register 301 is read out.
Is “input data”, and only when the second ready register 401 is “write OK”, data is read from the register 121 a of the read-side register group 121, data is processed, and the write-side register group 122 is read. The data is written to the register 122a. Thereafter, “write OK” is set in the second ready register 401 of the register 121 a of the read-side register group 121, and “input data exists” is set in the first ready register 301 of the register 122 a of the write-side register group 122. .
Further, the register 121 of the read-side register group 121
"No input data" in the first ready register 301 of "a"
Is set, and the register 1 of the write-side register group 122 is set.
"Write inhibit" is set in the second ready register 401 of 22a.

【0048】一方、読み出し側レジスタ群121のレジ
スタ121aの第1のレディレジスタ301が「入力デ
ータなし」の場合、あるいは書き込み側レジスタ群12
2のレジスタ122aの第2のレディレジスタ401が
「書き込み禁止」の場合には、処理を開始せず、第1の
レディレジスタ301あるいは第2のレディレジスタ4
01を読み出すだけのウエイト状態を続ける。
On the other hand, when the first ready register 301 of the register 121a of the read-side register group 121 is "no input data", or when the write-side register group 12
When the second ready register 401 of the second register 122a is “write-protected”, the process is not started, and the first ready register 301 or the second ready register 4 is not started.
The wait state of only reading 01 is continued.

【0049】2つのシーケンサは少なくとも3つのレジ
スタを有し、これらの3つのレジスタは2つのシーケン
サによって排他的に用いられる。例えば、シーケンサ1
01が検索キーレジスタ群121の1つのレジスタ12
1aのデータ書き込みを行っている場合、シーケンサ1
02は検索キーレジスタ群121の他の1つのレジスタ
121bからデータの読み込みを行い、検索キーレジス
タ群121の残りの1つのレジスタ121cは休止とな
る。
The two sequencers have at least three registers, and these three registers are used exclusively by the two sequencers. For example, sequencer 1
01 is one register 12 of the search key register group 121
1a, the sequencer 1
02 reads data from another register 121b of the search key register group 121, and the other register 121c of the search key register group 121 is inactive.

【0050】上記排他的動作について、各レジスタ群と
各シーケンサの動作を示す図8を用いて、さらに説明す
る。
The exclusive operation will be further described with reference to FIG. 8 showing the operation of each register group and each sequencer.

【0051】複数のシーケンサはあるレジスタを用いて
データを受け渡すのであるが、レジスタへの書き込みと
読み出しとが同時に起こると、データの妥当性が無くな
る恐れがあるために、書き込みと読み出しを排他的に制
御することが求められる。以下、排他的な動作について
説明する。
Although a plurality of sequencers transfer data using a certain register, if writing and reading to the register occur at the same time, the validity of the data may be lost. Control is required. Hereinafter, the exclusive operation will be described.

【0052】例えば、検索キーレジスタ群121の動作
に着目して説明すると、検索キーレジスタ群121の第
1のレジスタ121aがシーケンサ101の書き込みに
使用されているときには、検索キーレジスタ群121の
第2のレジスタ121bは、シーケンサ102の読み出
しに使用されており、検索キーレジスタ群121の第3
のレジスタ121cはどこからもアクセスされない状
態、またはシーケンサ101,102のどちらか一方の
使用が可能な状態である。
For example, focusing on the operation of the search key register group 121, when the first register 121a of the search key register group 121 is used for writing in the sequencer 101, the second register of the search key register group 121 is used. Of the search key register group 121 are used for reading of the sequencer 102.
Is in a state where it is not accessed from anywhere, or a state where either of the sequencers 101 and 102 can be used.

【0053】シーケンサ101,102は、各々の処理
を終了したら、次の処理のために別のレジスタを使用す
る。つまり、検索キーレジスタ群121の第2のレジス
タ121bはシーケンサ101の書き込みに使用され、
検索キーレジスタ群121の第3のレジスタ121c
は、シーケンサ102の読み出しに使用されており、検
索キーレジスタ群121の第1のレジスタ121aはど
こからもアクセスされない状態、またはシーケンサ10
1,102のどちらか一方の使用が可能な状態となる。
After completing each process, the sequencers 101 and 102 use another register for the next process. That is, the second register 121b of the search key register group 121 is used for writing in the sequencer 101,
Third register 121c of search key register group 121
Is used for reading of the sequencer 102, and the first register 121a of the search key register group 121 is not accessed from anywhere, or the sequencer 10
It becomes a state where either one of 1, 102 can be used.

【0054】このような動作を行うことで、各レジスタ
は読み込みと書き込みが排他的に行われるため、レジス
タへの書き込みと読み出しが同時に起こることに起因す
るデータの妥当性の心配は解消される。
By performing such an operation, reading and writing of each register are performed exclusively, so that concern about the validity of data due to simultaneous writing and reading of the register is eliminated.

【0055】以上説明したように、本実施形態では、ハ
ンドシェイクを用いた確実なパイプライン制御が行な
え、あるいは各手段で周期が異なることも可能である
し、周期の始まりを一致させる必要もなくなり、パイプ
ライン制御の場合には、もっとも周期の長いものに全手
段を合わせる必要があるのに比べて、より短時間で処理
を終了することができる。なお、図8において、シーケ
ンサに代えて汎用CPUを用いて第1の実施形態の構成
に用いることも可能である。
As described above, in the present embodiment, reliable pipeline control using handshake can be performed, or the period can be different for each means, and it is not necessary to match the start of the period. In the case of pipeline control, the processing can be completed in a shorter time than when all means need to be adjusted to the one having the longest cycle. In FIG. 8, it is also possible to use a general-purpose CPU instead of the sequencer in the configuration of the first embodiment.

【0056】<第5の実施形態>上記本発明の第4の実
施形態においては、シーケンサ101〜103の各シー
ケンサは、第1のレディレジスタが「入力データな
し」、あるいは第2のレディレジスタが「書き込み禁
止」の場合、常に読み出しを行うウエイト状態としてい
たが、本第5の実施形態では図4(b)を用いて説明し
た動作と同様に、決められたウエイト時間の間、読み出
しを行わないウエイト状態になる構成とした。これによ
り、制御がさらに簡単になるため、そのぶん処理を高速
化できる。
<Fifth Embodiment> In the fourth embodiment of the present invention, each of the sequencers 101 to 103 has a first ready register of "no input data" or a second ready register of In the case of "write-inhibited", the wait state in which reading is always performed is set. However, in the fifth embodiment, reading is performed for a predetermined wait time, similarly to the operation described with reference to FIG. There was no weight state. This further simplifies the control, thereby speeding up the processing.

【0057】なお、本実施形態ではそれぞれあらかじめ
決められた固定時間の始まりに現固定時間内にどの処理
プログラムを実行するかを決定しても、固定時間の終わ
りに、次の固定時間内にどの処理プログラムを実行する
かを、決定してもよい。
In the present embodiment, even if it is determined which processing program is to be executed within the current fixed time at the beginning of a predetermined fixed time, at the end of the fixed time, which processing program is to be executed within the next fixed time Whether to execute the processing program may be determined.

【0058】<第6の実施形態>本発明の第6の実施形
態は、第5の実施形態において、シーケンサの処理時間
が一定ではないが、ある決められた基準周期の整数倍と
なる場合である。
<Sixth Embodiment> The sixth embodiment of the present invention relates to the case where the processing time of the sequencer is not constant but becomes an integral multiple of a predetermined reference period in the fifth embodiment. is there.

【0059】例えば、シーケンサ101とシーケンサ1
02との処理時間がともにある決められた基準周期の整
数倍であるが、その処理時間が異なる場合に、シーケン
サ101とシーケンサ102との処理時間の差も基準周
期の整数倍となる。そのため、本実施形態では第5の実
施形態における決められたウエイト時間を基準周期の整
数倍とした。
For example, the sequencer 101 and the sequencer 1
02 is an integral multiple of a predetermined reference cycle, but if the processing times are different, the difference in processing time between the sequencer 101 and the sequencer 102 is also an integral multiple of the reference cycle. Therefore, in the present embodiment, the determined wait time in the fifth embodiment is set to an integral multiple of the reference cycle.

【0060】例えば、図4(c)を用いて具体的に説明
すると、例えば基準周期を100クロックとした場合、
シーケンサ1は処理プログラムAの終了後、100クロ
ック毎にレジスタを読み出して、処理プログラムB用の
レジスタのフラグの状態を検出する。また、100クロ
ック毎とせず、100クロックの整数倍の400クロッ
ク目にレジスタの状態を読み出し、フラグが立っていた
ならば、次の処理プログラムAの処理を開始する。これ
により、処理を開始する必要のない時刻が決まるため、
制御が簡単になるため、そのぶん処理を高速化できる。
For example, a specific description will be given with reference to FIG. 4C. For example, when the reference cycle is 100 clocks,
After completion of the processing program A, the sequencer 1 reads the register every 100 clocks and detects the state of the flag of the register for the processing program B. Further, the state of the register is read out at the 400th clock which is an integral multiple of the 100th clock, instead of every 100th clock. If the flag is set, the processing of the next processing program A is started. This determines when the process does not need to start,
Since the control is simplified, the processing can be accelerated accordingly.

【0061】<第7の実施形態>本発明の第7の実施形
態は、図10に示すように、第2の実施形態において、
第1のシーケンサ101が処理結果を蓄積するレジスタ
として、キーレジスタ121と検索結果レジスタ122
を両方使用し、第2のシーケンサ102が処理結果を蓄
積するレジスタとして、検索結果レジスタ122を使用
し、第3のシーケンサ103が処理結果を蓄積するレジ
スタとして、キュー準備レジスタ123を使用する構成
である。つまり、検索結果レジスタ122は、第1のシ
ーケンサ101と第2のシーケンサ102の両方から書
き込みがあるレジスタである。ただし、検索結果レジス
タ122は、該両方のシーケンサ101,102から同
時にアクセスされることはない。これは、第1の実施形
態でも述べたように、レジスタ122は、3個用意され
ており、3つのシーケンサそれぞれが、1つを読むある
いは書くことに使用しているためである。
<Seventh Embodiment> A seventh embodiment of the present invention is different from the second embodiment in that, as shown in FIG.
A key register 121 and a search result register 122 are used as registers in which the first sequencer 101 accumulates processing results.
Are used, the second sequencer 102 uses the search result register 122 as a register for storing processing results, and the third sequencer 103 uses the queue preparation register 123 as a register for storing processing results. is there. That is, the search result register 122 is a register to which data is written from both the first sequencer 101 and the second sequencer 102. However, the search result register 122 is not accessed simultaneously by both of the sequencers 101 and 102. This is because, as described in the first embodiment, three registers 122 are prepared, and each of the three sequencers uses one to read or write one.

【0062】第1のシーケンサ101は、第1のレジス
タ121に検索に必要な情報を書き込み、同時に第2の
レジスタ122に第3のシーケンサ103が必要とする
情報(スルー情報)をパケットヘッダ可能部分から抽出
して、書き込む。その他は、(CPUをシーケンサに書
き換えた)第1の実施形態と同様である。
The first sequencer 101 writes information necessary for the search in the first register 121, and at the same time, stores the information (through information) required by the third sequencer 103 in the second register 122 as a packet header-capable portion. Extract from and write. The rest is the same as the first embodiment (in which the CPU is replaced with a sequencer).

【0063】これにより、(CPUをシーケンサに書き
換えた)第1の実施形態においては必要である第2のシ
ーケンサ102がスルー情報をレジスタ122からレジ
スタ123へ移動させるという処理が必要ではなくなる
ことで、制御が簡単になるため、そのぶん処理を高速化
できる。
This eliminates the need for the second sequencer 102, which is required in the first embodiment (in which the CPU is replaced with a sequencer), to move through information from the register 122 to the register 123, thereby eliminating the need for processing. Since the control is simplified, the processing can be accelerated accordingly.

【0064】本実施形態で、シーケンサに代えて汎用C
PUを用いる構成も可能である。また、シーケンサ10
1はサーチ/学習シーケンサ102が管理する検索結果
レジスタ122に直接作用することを示したが、サーチ
/学習シーケンサ102がキュー準備レジスタ123に
直接書き込むことも可能である。
In this embodiment, a general-purpose C is used instead of the sequencer.
A configuration using a PU is also possible. In addition, the sequencer 10
Although 1 indicates that the search / learning sequencer 102 directly operates on the search result register 122 managed by the search / learning sequencer 102, the search / learning sequencer 102 may directly write into the queue preparation register 123.

【0065】<第8の実施形態>本発明の第8の実施形
態は、図11,図12,図13に示すように、第2〜7
の実施形態における各シーケンサの行なう処理におい
て、該処理は複数の命令から構成されており、図12に
示すように、1つの命令の実行が加算やシフト算や、比
較算のように汎用CPUにおいて用いられているような
基本演算を用いて、あるいは1つの命令が、あるデータ
の加算した結果を比較しながら同時に別のデータをシフ
トするといったような該基本演算の並列あるいは順次的
組み合わせで構成されている特殊演算を用いて実行され
る演算と命令で構成されている。これらの演算はどちら
もハードウエアで構成されている。
<Eighth Embodiment> As shown in FIGS. 11, 12, and 13, an eighth embodiment of the present invention is the same as that shown in FIGS.
In the processing performed by each sequencer in the embodiment, the processing is composed of a plurality of instructions. As shown in FIG. 12, execution of one instruction is performed by a general-purpose CPU such as addition, shift calculation, and comparison calculation. One instruction is composed of parallel or sequential combinations of the basic operations such as those used, or one instruction shifting the other data at the same time while comparing the result of adding one data. It consists of an operation and an instruction executed using the special operation. Both of these operations are configured by hardware.

【0066】以下、汎用CPUとシーケンサの処理クロ
ック数の比較について説明する。
The comparison of the number of processing clocks between the general-purpose CPU and the sequencer will be described below.

【0067】図11に示すように、汎用CPU600に
おいては、命令セット604から取り出された命令は、
レジスタ603の情報を用いて、第1の基本演算601
あるいは第2の基本演算602を用いて演算結果を出
し、再度レジスタ603に書き込む。
As shown in FIG. 11, in the general-purpose CPU 600, the instructions fetched from the instruction set 604 are:
Using the information in the register 603, a first basic operation 601
Alternatively, an operation result is obtained using the second basic operation 602, and the result is written into the register 603 again.

【0068】また、図12に示すように、本実施形態の
シーケンサ700においては、命令セット704から取
り出された命令は、レジスタ703の情報を用いて、特
殊演算701あるいは基本演算602あるいは基本演算
601を用いて演算結果を出し、再度レジスタ703に
書き込む。
As shown in FIG. 12, in the sequencer 700 of the present embodiment, an instruction fetched from the instruction set 704 uses a special operation 701 or a basic operation 602 or a basic operation 601 by using information of a register 703. Is used to generate the operation result, and the result is written into the register 703 again.

【0069】例えば、XとYという2つの情報があるレ
ジスタにあり、この2つを用いて、Z=2×X+2×Y
を求め、ZをレジスタZに書き込むという処理を行な
う。基本演算としては、図12に示すように加算602
及びシフト601を持っており、基本演算を用いて、命
令を並べると以下のようになる。各命令は1クロックで
実行する。レジスタXを1ビットシフトして(1クロッ
ク目)、レジスタYを1ビットシフトして(2クロック
目)、レジスタXとレジスタYとを加算して(3クロッ
ク目)、結果をレジスタZに書き込む(4クロック
目)。
For example, there is a register having two pieces of information, X and Y, and using these two, Z = 2 × X + 2 × Y
And writing Z into the register Z is performed. The basic operation is an addition 602 as shown in FIG.
And a shift 601, and the instructions are arranged using the basic operation as follows. Each instruction executes in one clock. Register X is shifted by one bit (first clock), register Y is shifted by one bit (second clock), register X and register Y are added (third clock), and the result is written to register Z. (4th clock).

【0070】一方、図13に示すように特殊演算701
は、ビットシフト801とビットシフト802と加算8
03とを持ち、Z=2×X+2×Yを求め、Zをレジス
タZ813に書き込むという処理を1クロックで行なう
演算(演算Zと呼ぶ)である。従って、特殊演算を用い
て命令を構成すると、演算Z(1クロック目)だけとな
る。このように、あらかじめ必要な演算を特殊命令とし
て、ハードウエアで実現しているため、処理の高速化が
行なえる。一方、基本演算を組み合わせることで、特殊
演算を実現できるようにしておけば、ハードウエアでは
汎用CPUよりも同じ処理を高速に実現できるため高速
化が行なえ、また命令の組み合わせの変更で演算の組み
合わせの変更が可能になるため、柔軟性も得られ、設計
変更や新規処理の追加が高速性という利点を保ちつつ、
低コストで実現できる。
On the other hand, as shown in FIG.
Is the bit shift 801 and the bit shift 802 and the addition 8
03, and Z = 2 × X + 2 × Y is obtained, and Z is written into the register Z813 in one clock (referred to as operation Z). Therefore, if an instruction is formed using a special operation, only the operation Z (first clock) is performed. As described above, since necessary operations are realized by hardware as special instructions, the processing speed can be increased. On the other hand, if special operations can be realized by combining basic operations, the same processing can be performed at a higher speed in hardware than a general-purpose CPU, so that the speed can be increased. Can be changed, giving you the flexibility to make design changes and add new processing while maintaining the benefits of speed.
It can be realized at low cost.

【0071】上記各実施形態において、パケットのヘッ
ダ処理装置及びヘッダ処理方法について説明したが、こ
れらはMACヘッダやTCP/IPヘッダに限らず、他
のヘッダ処理にも適用できるものである。また、汎用C
PUやシーケンサの数を3個として説明したが、もっと
多数の汎用CPU或いはシーケンサを用いることで更な
る高速化を図ることができる。
In the above embodiments, the header processing apparatus and the header processing method of the packet have been described. However, the present invention is not limited to the MAC header and the TCP / IP header, but can be applied to other header processing. In addition, general-purpose C
Although the number of PUs and sequencers has been described as three, the speed can be further increased by using a larger number of general-purpose CPUs or sequencers.

【0072】また、各実施形態において、第1〜第3の
手段をCPU101〜103又はシーケンサ101〜1
03で構成した例を示したが、第1〜第3の手段は1つ
のシーケンサと2つのCPU、2つのシーケンサと1つ
のCPU、独立した3つのシーケンサ、独立した3つの
CPUで構成してもよく、また、共有される(第1〜第
3の手段のうち二つの手段が共有される)シーケンサと
一つのシーケンサあるいは一つのCPU、共有されるC
PUと一つのシーケンサあるいは一つのCPUで構成し
てもよい。図9は、図1において三つのCPUのうち一
つのCPUを一つのシーケンサに置き換えた場合を示す
システムの概念ブロック図である。
In each embodiment, the first to third means are replaced by the CPU 101 to 103 or the sequencer 101 to 1.
Although the example of the configuration in FIG. 03 is shown, the first to third means may be configured by one sequencer and two CPUs, two sequencers and one CPU, three independent sequencers, and three independent CPUs. Also, a sequencer that is shared (two of the first to third means are shared) and one sequencer or one CPU, shared C
It may be composed of a PU and one sequencer or one CPU. FIG. 9 is a conceptual block diagram of a system showing a case where one of the three CPUs in FIG. 1 is replaced with one sequencer.

【0073】[0073]

【発明の効果】本発明によれば、汎用CPUを用いてボ
トルネックになる資源で制約される速度までヘッダ処理
が低コストで高速化できる。また、シーケンサを用い
て、パケットヘッダ処理をプログラマブルなハードウエ
ア論理回路で実現することで、高速性を保ちながら、設
計変更や将来の機能追加を低コストで実現できる。さら
に、複数の処理をパイプラインとして動作させて、ヘッ
ダ処理、例えば次のルータの宛先の検索とパケットに宛
先データの挿入等のルーティング処理等を高速に実行で
きる。
According to the present invention, header processing can be performed at low cost and at high speed using a general-purpose CPU up to a speed restricted by resources that become a bottleneck. Also, by using a sequencer to implement packet header processing with a programmable hardware logic circuit, design changes and future functions can be realized at low cost while maintaining high speed. Further, by operating a plurality of processes as a pipeline, header processing, for example, routing processing such as searching for the destination of the next router and inserting destination data into a packet can be executed at high speed.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の一実施形態のシステムの概念ブロック
図である。
FIG. 1 is a conceptual block diagram of a system according to an embodiment of the present invention.

【図2】本発明のヘッダ処理のシステムの概念ブロック
図である。
FIG. 2 is a conceptual block diagram of a header processing system according to the present invention.

【図3】本発明のヘッダ処理のシステムの概念ブロック
図である。
FIG. 3 is a conceptual block diagram of a header processing system according to the present invention.

【図4】本発明のヘッダ処理のシステムの概念ブロック
図である。
FIG. 4 is a conceptual block diagram of a header processing system according to the present invention.

【図5】本発明のヘッダ処理のシステムの概念ブロック
図である。
FIG. 5 is a conceptual block diagram of a header processing system according to the present invention.

【図6】本発明の一実施形態のシステムの概念ブロック
図である。
FIG. 6 is a conceptual block diagram of a system according to an embodiment of the present invention.

【図7】本発明の一実施形態のシステムの概念ブロック
図である。
FIG. 7 is a conceptual block diagram of a system according to an embodiment of the present invention.

【図8】本発明の一実施形態のシステム処理の概念ブロ
ック図である。
FIG. 8 is a conceptual block diagram of a system process according to an embodiment of the present invention.

【図9】図5において一つのCPUを一つのシーケンサ
に置き換えた場合を示すシステムの概念ブロック図であ
る。
FIG. 9 is a conceptual block diagram of a system showing a case where one CPU is replaced with one sequencer in FIG. 5;

【図10】本発明の一実施形態のシステムの概念ブロッ
ク図である。
FIG. 10 is a conceptual block diagram of a system according to an embodiment of the present invention.

【図11】本発明の一実施形態のシステムの概念ブロッ
ク図である。
FIG. 11 is a conceptual block diagram of a system according to an embodiment of the present invention.

【図12】本発明の一実施形態のシステムの概念ブロッ
ク図である。
FIG. 12 is a conceptual block diagram of a system according to an embodiment of the present invention.

【図13】本発明の一実施形態のシステムの概念ブロッ
ク図である。
FIG. 13 is a conceptual block diagram of a system according to an embodiment of the present invention.

【図14】DIX規定とIEEE802.3規定の80
2.1Q規定とのフォーマットである。
FIG. 14: 80 of DIX regulation and IEEE 802.3 regulation
2.1 Q format.

【符号の説明】[Explanation of symbols]

101 前処理シーケンサ 102 サーチ/学習エンジン 103 後処理シーケンサ 120 ヘッダレジスタ 121 検索キーレジスタ 122 検索結果レジスタ 123 キュー準備レジスタ 201 同期タイマ 301,302,303 レディレジスタ 401,402,403 レディレジスタ 101 Pre-processing sequencer 102 Search / learning engine 103 Post-processing sequencer 120 Header register 121 Search key register 122 Search result register 123 Queue preparation register 201 Synchronous timer 301, 302, 303 Ready register 401, 402, 403 Ready register

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) H04L 29/02 H04L 12/56 ──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int.Cl. 7 , DB name) H04L 29/02 H04L 12/56

Claims (15)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 パケットから抽出されたヘッダを含むパ
ケットの一部分から、プロトコルヘッダの各フィールド
のデータを抽出し、指定された記憶場所に入力する第1
の手段と、 該指定された記憶場所のデータを検索キーにして検索を
行い、該検索キーに一致するテーブルエントリの内容を
出力する第2の手段と、 該第2の手段の出力内容と前記記憶場所のデータとか
ら、前記パケットの送出先とヘッダ更新情報の属性情報
を作成する第3の手段と、 を有し、 前記第1〜第3の各手段は、それぞれあらかじめ決めら
れた固定時間の始まりあるいは終わりに、現固定時間内
に、あるいは次の固定時間内にどの処理プログラムを実
行するかを、決定することを特徴とするヘッダ処理装
置。
1. A first method of extracting data of each field of a protocol header from a part of a packet including a header extracted from the packet and inputting the data to a designated storage location
Means for performing a search using the data at the specified storage location as a search key, and outputting the contents of a table entry matching the search key; and output means of the second means and from a storage location of the data, and a third means for creating the attribute information of the destination and the header update information of the packet, have a, the first to third means, respectively predetermined et al
At the beginning or end of the fixed time
Or which processing program to execute within the next fixed time
Header processing device, characterized in that
Place.
【請求項2】 パケットから抽出されたヘッダを含むパ
ケットの一部分から、プロトコルヘッダの各フィールド
のデータを抽出し、指定された記憶場所に入力する第1
の手段と、 該指定された記憶場所のデータを検索キーにして検索を
行い、該検索キーに一致するテーブルエントリの内容を
出力する第2の手段と、 該第2の手段の出力内容と前記記憶場所のデータとか
ら、前記パケットの送出先とヘッダ更新情報の属性情報
を作成する第3の手段と、 を有し、 前記第1〜第3の各手段は、それぞれあらかじめ決めら
れた命令数の整数倍で処理を終了し、処理終了時あるい
は開始時に、他の手段の処理の終了あるいは開始を確認
し、少なくとも他の1つの手段において終了あるいは開
始が確認できない場合には、命令の実行を一時停止し、
全手段が処理の終了あるいは開始状態になるのを待つこ
とを特徴とするヘッダ処理装置。
2. A packet including a header extracted from a packet.
Each field of the protocol header from a portion of the
The first to extract the data of the data and input it to the specified storage location
And a search using the data at the designated storage location as a search key.
And the contents of the table entry that matches the search key are
Second means for outputting, output contents of the second means and data of the storage location,
The destination information of the packet and the attribute information of the header update information
The has a third means for creating the said first to third means, respectively predetermined et al
Processing ends at an integral multiple of the number of instructions
Confirms completion or start of processing of other means at the start
Terminate or open in at least one other means.
If the start cannot be confirmed, execution of the instruction is suspended,
Wait for all means to end or start processing.
And a header processing device.
【請求項3】 パケットから抽出されたヘッダを含むパ
ケットの一部分から、プロトコルヘッダの各フィールド
のデータを抽出し、指定された記憶場所に入力する第1
の手段と、 該指定された記憶場所のデータを検索キーにして検索を
行い、該検索キーに一 致するテーブルエントリの内容を
出力する第2の手段と、 該第2の手段の出力内容と前記記憶場所のデータとか
ら、前記パケットの送出先とヘッダ更新情報の属性情報
を作成する第3の手段と、 を有し、 前記第1の手段における記憶場所として、1つの共用部
分と2つの個別部分を有し、該共用部分は、一部あるい
は全てのフィールドデータを前記第2の手段と前記第3
の手段で共用して使用するような記憶場所として用い、
前記個別部分は、各個別部分に同一内容のデータを持ち
且つ各個別部分のそれぞれを、前記第2の手段と、前記
第3の手段で独立に用いることを特徴とするヘッダ処理
装置。
3. A packet including a header extracted from a packet.
Each field of the protocol header from a portion of the
The first to extract the data of the data and input it to the specified storage location
And a search using the data at the designated storage location as a search key.
Done, the contents of the table entry that one Itasu to the search key
Second means for outputting, output contents of the second means and data of the storage location,
The destination information of the packet and the attribute information of the header update information
A third means for creating a a, as a storage location in said first means, one shared section
It has a minute and two separate parts, and the common part is part or
Converts all the field data into the second means and the third
Used as a storage location that is shared by
The individual parts have the same data in each individual part.
And, each of the individual parts, the second means,
Header processing characterized by being used independently by the third means
apparatus.
【請求項4】 請求項1〜3のいずれか1項に記載のヘ
ッダ処理装置において、前記第1〜第3の手段は、1つ
のシーケンサと2つのCPU、2つのシーケンサと1つ
のCPU、3つのシーケンサ、3つのCPU、のいずれ
かにより構成されることを特徴とするヘッダ処理装置。
4. A header processing apparatus according to claim 1, wherein the first through third means, one of the sequencer and two CPU, two sequencers and one CPU, 3 A header processing device comprising one of three sequencers and three CPUs.
【請求項5】 請求項1〜3のいずれか1項に記載のヘ
ッダ処理装置において、前記第1〜第3の手段は、共有
されるシーケンサと一つのシーケンサあるいは一つのC
PU、共有されるCPUと一つのシーケンサあるいは一
つのCPU、のいずれかにより構成されることを特徴と
するヘッダ処理装置。
5. The header processing apparatus according to claim 1, wherein the first through third means, sequencer and one sequencer or a C shared
A header processing device comprising a PU, a shared CPU and one sequencer or one CPU.
【請求項6】 請求項1〜5のいずれか1項に記載のヘ
ッダ処理装置において、前記第1〜第3の手段をそれぞ
れパイプライン処理する手段を有することを特徴とする
ヘッダ処理装置。
In the header processing apparatus according to any one of the claims 6] claims 1-5, header processing apparatus characterized by comprising: means for pipelining respectively the first to third means.
【請求項7】 請求項に記載のヘッダ処理装置におい
て、前記パイプライン処理について前記第1〜第3の手
段のいずれかで制御の受け渡しをハンドシェイクを用い
て行うことを特徴とするヘッダ処理装置。
7. A header processing apparatus according to claim 6, header processing, characterized in that for transferring the control in any of the first through third means for the pipeline processing using a handshake apparatus.
【請求項8】 請求項4〜7のいずれか1項に記載のヘ
ッダ処理装置において、前記第1の手段におけるシーケ
ンサの命令として、ヘッダ可能性部分から、MAC(Me
dia Access Control)パケットのヘッダのMACアドレ
スにより識別される、DIX規格とIEEE規格80
2.3規定の2つの標準形式と該2つの標準形式に80
2.1Q規定の仮想LANの識別子がついているか否か
の2種類との4通りのMACフォーマットを抽出し、必
要に応じて、該MACパケットの ペイロードとしてのI
Pパケットを抽出する特殊演算からなる第1の命令セッ
トと、任意の複数ビットを抽出する基本演算からなる第
2の命令セットとを持ち、前記第1の命令セットと前記
第2の命令セットの命令を各々固有のハードウエアで処
理することを特徴とするヘッダ処理装置。
8. A header processing apparatus according to any one of claims 4-7, as a sequencer instruction in the first means, from the header possibility moiety, MAC (Me
dia Access Control) MAC address of packet header
DIX standard and IEEE standard 80
2.3 Two standard formats and 80
2.1 Whether the virtual LAN identifier specified in Q is attached
And extract the four types of MAC formats.
If necessary, I as the payload of the MAC packet
It has a first instruction set consisting of a special operation for extracting P packets and a second instruction set consisting of a basic operation for extracting arbitrary plural bits, and has a first instruction set and a second instruction set. A header processing device wherein instructions are processed by respective hardware.
【請求項9】 請求項4〜7のいずれか1項に記載のヘ
ッダ処理装置において、前記第2の手段におけるシーケ
ンサの命令として、テーブルへの検索データ入力と前記
テーブルからの検索結果のレジスタへの蓄積を行う特殊
演算からなる第1の命令セットと、任意の複数ビットを
レジスタからレジスタへ移動する基本演算からなる第2
の命令セットとを持ち、前記第1の命令セットと前記第
2の命令セットの命令を各々固有のハードウエアで処理
することを特徴とするヘッダ処理装置。
9. The header processing apparatus according to claim 4 , wherein the instruction of the sequencer in the second means is a search data input to a table and a register of a search result from the table. A first instruction set consisting of a special operation for accumulating data and a second instruction consisting of a basic operation for moving arbitrary plural bits from register to register
A header processing apparatus, comprising: a first instruction set and a second instruction set, wherein instructions of the first instruction set and the second instruction set are respectively processed by unique hardware.
【請求項10】 請求項4〜7のいずれか1項に記載の
ヘッダ処理装置において、前記第3の手段におけるシー
ケンサの命令として、検索結果出力から装置内パケット
ヘッダの作成を行なう特殊演算からなる第1の命令セッ
トと、任意の複数ビットをレジスタからレジスタへ移動
する基本演算からなる第2の命令セットとを持ち、前記
第1の命令セットと前記第2の命令セットの命令を各々
固有のハードウエアで処理することを特徴とするヘッダ
処理装置。
10. The header processing device according to claim 4 , wherein the sequencer instruction in said third means comprises a special operation for generating an in-device packet header from a search result output. A first instruction set and a second instruction set consisting of basic operations for moving arbitrary plural bits from a register to a register, wherein the instructions of the first instruction set and the instructions of the second instruction set are respectively unique. A header processing device characterized by processing by hardware.
【請求項11】 パケットから抽出されたヘッダを含む
パケットの一部分から、プロトコルヘッダの各フィール
ドのデータを抽出し、指定された記憶場所に入力する第
1の手順と、該指定された記憶場所のデータを検索キー
にして検索を行い、前記検索キーに一致するテーブルエ
ントリの内容を出力する第2の手順と、該第2の手順の
出力内容と前記記憶場所のデータとから、前記パケット
の送出先とヘッダ更新情報の属性情報を作成する第3の
手順と、を有し、 前記第1〜第3の各手順は、それぞれあらかじめ決めら
れた固定時間の始まりあるいは終わりに、現固定時間内
に、あるいは次の固定時間内にどの処理プログラムを実
行するかを、決定するヘッダ処理方法。
11. A first step of extracting data of each field of a protocol header from a part of a packet including a header extracted from the packet and inputting the data to a designated storage location, A second procedure of performing a search using data as a search key and outputting the contents of a table entry matching the search key; and transmitting the packet from the output contents of the second procedure and the data of the storage location. possess a third step in creating the attribute information of the previous and the header update information, and the first to third steps in each predetermined et al
At the beginning or end of the fixed time
Or which processing program to execute within the next fixed time
Header processing method that determines whether to execute.
【請求項12】 請求項11に記載のヘッダ処理方法に
おいて、前記第1〜第3の手順は、1つのシーケンサと
2つのCPU、2つのシーケンサと1つのCPU、3つ
のシーケンサ、3つのCPU、のいずれかを用いて実行
されることを特徴とするヘッダ処理方法。
12. The header processing method according to claim 11 , wherein the first to third procedures include one sequencer and two CPUs, two sequencers and one CPU, three sequencers, three CPUs, A header processing method characterized by being performed using any one of the following.
【請求項13】 請求項11に記載のヘッダ処理方法に
おいて、前記第1〜第3の手順は、共有されるシーケン
サと一つのシーケンサあるいは一つのCPU、共有され
るCPUと一つのシーケンサあるいは一つのCPU、の
いずれかを用いて実行されることを特徴とするヘッダ処
理方法。
13. The header processing method according to claim 11 , wherein the first to third procedures are performed by a shared sequencer and one sequencer or one CPU, and a shared CPU and one sequencer or one sequencer. A header processing method characterized by being executed using any one of a CPU.
【請求項14】 請求項11〜13のいずれか1項に記
載のヘッダ処理方法において、前記第1〜第3の手順を
それぞれパイプライン処理によって行うことを特徴とす
るヘッダ処理方法。
14. The header processing method according to claim 11 , wherein each of the first to third procedures is performed by pipeline processing.
【請求項15】 請求項14に記載のヘッダ処理方法に
おいて、前記パイプライン処理について前記第1〜第3
の手順のいずれかで制御の受け渡しをハンドシェイクを
用いて行うことを特徴とするヘッダ処理方法。
15. The header processing method according to claim 14 , wherein said pipeline processing is performed by said first to third headers.
Wherein the control is passed using a handshake in any one of the above procedures.
JP1600699A 1998-01-23 1999-01-25 Header processing device and header processing method Expired - Lifetime JP3233353B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1600699A JP3233353B2 (en) 1998-01-23 1999-01-25 Header processing device and header processing method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP10-11437 1998-01-23
JP1143798 1998-01-23
JP1600699A JP3233353B2 (en) 1998-01-23 1999-01-25 Header processing device and header processing method

Publications (2)

Publication Number Publication Date
JPH11317783A JPH11317783A (en) 1999-11-16
JP3233353B2 true JP3233353B2 (en) 2001-11-26

Family

ID=26346862

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1600699A Expired - Lifetime JP3233353B2 (en) 1998-01-23 1999-01-25 Header processing device and header processing method

Country Status (1)

Country Link
JP (1) JP3233353B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4203979B2 (en) 2000-08-02 2009-01-07 富士通株式会社 Packet processing device
KR100699470B1 (en) 2000-09-27 2007-03-26 삼성전자주식회사 Device for Processing multi-layer packet
JP3947521B2 (en) 2002-03-05 2007-07-25 富士通株式会社 Communication device
JP3789395B2 (en) 2002-06-07 2006-06-21 富士通株式会社 Packet processing device
JP5966347B2 (en) * 2011-12-21 2016-08-10 ソニー株式会社 Image processing apparatus and method
JP5966346B2 (en) * 2011-12-21 2016-08-10 ソニー株式会社 Image processing apparatus and method
CN104219160B (en) * 2013-05-31 2018-08-14 华为技术有限公司 Generate the method and apparatus of input parameter

Also Published As

Publication number Publication date
JPH11317783A (en) 1999-11-16

Similar Documents

Publication Publication Date Title
US9110714B2 (en) Systems and methods for multi-tasking, resource sharing, and execution of computer instructions
US11677664B2 (en) Apparatus and method of generating lookups and making decisions for packet modifying and forwarding in a software-defined network engine
US6330584B1 (en) Systems and methods for multi-tasking, resource sharing and execution of computer instructions
US7089407B2 (en) Packet processing device processing input packet data in a packet routing device
TW200301429A (en) A method of improving the lookup performance of tree-type knowledge base searches
WO1996034479A1 (en) Packet switching engine
JP2001251349A (en) Packet processor
US7937495B2 (en) System and method for modifying data transferred from a source to a destination
US5784373A (en) Switching device for LAN
JP3233353B2 (en) Header processing device and header processing method
CN116860488B (en) Process communication method and related device
KR100512980B1 (en) Packet processor and buffer memory controller for extracting and aligning packet header fields to improve efficiency of packet header processing of main processor and method thereof
US7058051B2 (en) Packet processing device
JP3837670B2 (en) Data relay apparatus, associative memory device, and associative memory device utilization information retrieval method
JP2000349816A (en) Packet data processor and packet repeater using the processor.
CN110933001A (en) Basic processing unit structure of extensible reconfigurable switch packet parser
JP3935021B2 (en) Packet processing method and apparatus
CN114827655B (en) Content storing and forwarding method and device, electronic equipment and storage medium
CN108599907A (en) Network interface controller
JP3058010B2 (en) Method and apparatus for communication between processors
JP3670372B2 (en) Data transfer device
CN118200258A (en) Protocol irrelevant bagel exchange packet head identification device based on high-order wide-stream structure
JP4423728B2 (en) Data transmission apparatus and method
JP3850773B2 (en) Output port judgment device
CN111937353A (en) Method for operating network participant and network participant

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080921

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080921

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090921

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090921

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100921

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110921

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120921

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130921

Year of fee payment: 12

EXPY Cancellation because of completion of term