JP4183920B2 - Packet data processing device - Google Patents

Packet data processing device Download PDF

Info

Publication number
JP4183920B2
JP4183920B2 JP2001039392A JP2001039392A JP4183920B2 JP 4183920 B2 JP4183920 B2 JP 4183920B2 JP 2001039392 A JP2001039392 A JP 2001039392A JP 2001039392 A JP2001039392 A JP 2001039392A JP 4183920 B2 JP4183920 B2 JP 4183920B2
Authority
JP
Japan
Prior art keywords
data
packet
data processing
unit
packet data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2001039392A
Other languages
Japanese (ja)
Other versions
JP2002247095A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2001039392A priority Critical patent/JP4183920B2/en
Publication of JP2002247095A publication Critical patent/JP2002247095A/en
Application granted granted Critical
Publication of JP4183920B2 publication Critical patent/JP4183920B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、入力されたパケットデータを処理するパイプライン構成されたパケットデータ処理装置に関する。
【0002】
【従来の技術】
端末間でパケット通信を行うにあたって、現在最も一般的に使用されているのは、IP(Internet Protocol)ネットワークである。このIPネットワークにおいて、ネットワーク間の中継を行うネットワークノードでは、中継装置のために、パケット内のヘッダ書き換え処理や装置内に具備する宛て先テーブルを検索しルーティングを行うといったパケット処理を行っている。近年のインターネットの高速化に伴い、パケットの中継を行うネットワークノードでは、パケット処理を専用のハードウェアで行うことによってパケット処理の高速化を図っている。従来、パケットの中継を行うネットワークノードのパケット処理部がパケットを処理するにあたって、ストアアンドフォワードによって処理を行う方式がある。
【0003】
図22は、ストアアンドフォワード方式の従来構成を示す図である。この構成では、一般的なプロセッサ又は専用のハードウェアにより構成されたパケット処理部2とメモリ4がバス6によって接続されており、パケット処理部2がメモリ4に格納されたパケットの必要なデータに対して処理を行うことによってパケット中継に必要な処理を行う。従来のストアアンドフォワードによるパケット処理では、パケット処理部2は、予め用意されたソフトウェアの命令に従って、メモリ4に格納したパケットに対して処理を行う。そのため、このパケット処理は、予め用意するソフトウェアの命令を書き換えることで、パケットに対して施したい処理を、後から容易に変更することが可能である。そのため、プロトコルの改訂やネットワークとして提供するサービス機能向上のために処理内容を後から変更可能である。
【0004】
しかし、この処理では、メモリ4にパケットデータを格納しているため、パケットデータを格納しているメモリ4への読み込み・書き込み動作が必要となる。パケット処理部2は、読み込むメモリのアドレスをメモリ4に与えてから、メモリ4からデータを読み込み、又はパケット処理部2は、パケット処理部2が書き込むメモリのアドレスをメモリ4に与えてから、メモリ4へデータを書き込むという処理を行う。このとき、プロセッサがアドレスをメモリ4に与えてから、パケット処理部2がデータをメモリ4から読み込み・書き込みを行う時間は、プロセッサのサイクルタイムと比較するとかなり大きい。そのため、メモリ4への読み込み・書き込み処理のオーバヘッドが問題となり、パケット処理を高速に行うことができない。
【0005】
そこで、近年、パケット処理を専用のハードウェア回路で高速に実行する方法が考案されている。専用のハードウェア回路では、パケット処理を高速なハードウェアのクロックで行うことができるので、パケットを高速に処理することができる。しかし、機能向上のための機能の変更を容易に行うことはできず、その都度新たなハードウェアを開発する必要があるという問題点がある。ところで、ネットワークノードがIP及び下位層のプロトコルを処理するにあたっては、各プロトコルヘッダ内にある情報を元に処理を行い、IPのデータ部にある情報を必要とすることは殆どない。この処理対象が各プロトコルヘッダだけであるといった局所性に注目することによって、高速処理を行うハードウェアが考えられる。
【0006】
図23は処理の局所性に注目したパケットデータ処理プロセッサを示す図である。パケットデータ処理プロセッサ10は、汎用レジスタ12、演算器14及びシフトレジスタ16,18を有する。パケットデータ処理プロセッサ10では、パケットデータと、一時的に保存しておきたい演算の結果などパケットと同期した情報を、それぞれクロック毎に次段へシフトするシフトレジスタ16,18で構成されるパイプラインに格納する。パケットデータ処理プロセッサ10には、パケットに対して行うべき処理を予めソフトウェアで記述しておく。パケットデータ処理プロセッサ10は、パケットの先頭が入力されると起動され、予め用意されたソフトウェアの記述に従って処理を行う。クロックによって各パイプラインを構成しているレジスタ16,18内のデータはシフトを行っていき、パケットデータ処理プロセッサ10は、決められたクロック数の間処理を行う。処理を終えた後、次のパケットが入力されると、同じようにそのパケットに対して処理を行う。
【0007】
図24は、パケット処理プロセッサを複数個並べたハードウェア構成を示す図である。図24に示すように、このハードウェア構成では、パケット処理プロセッサ30#i(i=1〜n)が複数個並べられている。図24のように並べた各パケットデータ処理プロセッサは各処理を行い、全体としてネットワークノードが必要とするパケット処理を完了する。この様な処理系でパケットを処理することは、処理がIP層までしか及ばない等、パケット処理に局所性があるときには、パイプライン構成をしたレジスタにより高速に処理でき、且つ、ソフトウェアの変更によって柔軟に処理を変更することができる。
【0008】
【発明が解決しようとする課題】
一方、ネットワークノードにおける処理の多機能化の必要性が高まっており、そのような処理の中にはパケットに対して新たなヘッダの付加や、必要のないヘッダの削除を行わなければならないものもある。このような処理が必要となるものに、トンネリング処理がある。トンネリング処理とは、例えば、2つのプライベートなネットワーク間の通信をインターネットなどの共有ネットワークを経由して使用する時に使用される。
【0009】
図25は、2つのプライベートなネットワーク間を共有ネットワークにより接続したネットワーク構成図である。図25において、プライベートネットワーク40#Aからプライベートネットワーク40#Bへ通信を行うときを考える。プライベートネットワーク40#Aから送信されたパケットは、プライベートネットワーク40#Aと共有ネットワーク42をつなぐネットワークノード44#Aによって共有ネットワーク42用のヘッダを付加され(カプセル処理)、インターネットなどの共有ネットワーク42に送信される。そして、そのパケットを受信するもう1つのプライベートネットワーク40#Bと共有ネットワーク42を接続するネットワークノード44#Bは、プライベートネットワーク40#Aから送られたパケットを受信すると、カプセル処理の時に付加されたヘッダを削除して(デカプセル処理)、カプセル処理される前のパケットに戻し、これをもう1つのプライベートネットワーク40#Bに送信するといった動作を行う。そのため、カプセル処理・デカプセル処理を行う必要のあるネットワークノード44#A,44#Bでは、上述のようなヘッダの付加・削除操作を行う必要がある。
【0010】
パケット処理の局所性に注目して処理を行うパケットデータ処理方式では、レジスタアクセスによる処理なので、パケット処理を高速に行うことができる。ヘッダの付加・削除もヘッダに注目して行われる処理なので、この処理方式を用いることで高速に処理を行うことができる。
【0011】
図26は、データ付加・削除前のパケットデータ処理プロセッサの状態を示す図である。例えば、パケットが図に示す状態でシフトレジスタ18に格納されているときを考える。図26中ハッチングされている部分がパケットを示し、パケットヘッダがP2に格納されている。このとき、P0にあるデータを削除したい場合には、P2,P1にあるデータをそれぞれP1,P0に上書すれば良い。また、P0とP1の間にデータを付加したいときは、P1,P2にあるデータをそれぞれP2,P3に上書し、P1に付加したいデータを書き込めばよい。しかし、データの付加処理では、処理後のパケットの全長は、処理前のパケットに比べて長くなるために問題がある。
【0012】
図27は、パケットが密接しているときのシフトレジスタの状態を示す図である。このパケットデータ処理方式では、連続してパケットが入力されるときは、図27に示すようにパケットが、次々に入力されていて、シフトレジスタ18に隙間無く存在している。この状態でパケットの付加を行うと、該パケットの前に処理されたパケットの上にデータを書き込んでしまい、前に処理されたパケットのデータを壊してしまう。例えば、P3に前に処理されたパケットのデータが格納されているとき、P2にあるデータを後にあるパケットのデータにより壊してしまう。これを避けるためには、パケットがパケットデータ処理群に入力されるときに、パケット間で一定の間隔を空けるように制御すれば、前に処理されたパケットにデータを上書することはなくなり、データの付加を行うことができる。しかし、全てのパケット間で一定の間隔を空けることは、データの付加をする必要のないパケットに対しても間隔を空けることになり、それだれ処理のスループットが小さくなることがある。
【0013】
以上のように、パケットの削除を行うといったパケットの全長が短くなるような処理は、従来のパケットデータ処理プロセッサで問題なく扱うことができる。しかし、パケットの付加を行うといったパケットの全長が元の全長よりも長くなる処理を従来のパケットデータ処理プロセッサで行うと処理効率が落ちてしまうことが問題であった。
【0014】
本発明は、上記を鑑みてなされたものであり、処理効率が落ちることなくパケットデータの付加をすることのできるパケットデータ処理装置を提供することを目的とする。
【0015】
【課題を解決するための手段】
図1は本発明の原理図である。図1に示すように、バケットデータ処理装置は、それぞれが入力されたパケットに対して処理をして後段に出力するパイプライン構成された複数のパケットデータ処理部50#i(i=1,2,…)から構成されるパケットデータ処理群52を有する。パケットデータ処理群52中の第1パケットデータ処理部50#Aは、入力されたパケットにデータを付加するデータ付加部54を有する。パケットデータ処理装置は、データ付加部54がデータ付加処理をしている間は、第1パケットデータ処理部50#Aの前段にパケットの出力の停止を指示し、データ付加部54がデータ付加処理終了後、第1パケットデータ処理部50#Aの前段にパケットの出力を再開するよう指示する制御部56を更に具備する。
【0016】
パケットがパケットデータ処理装置に入力されると、各パケットデータ処理部50#i(i=1,2,…)は、パケットに対して所定の処理を行う。パケットデータ処理群52又はパケットデータ処理群52とは別に設けられた制御部56は、パケットに対してデータ付加の必要があるとき、当該データ付加対象のパケットと前パケットの間隔を少なくともデータ付加長分確保するべく、第1パケットデータ処理部50#Aの前段のパケットデータ処理部50#i(i=1,2,…,B)にパケットデータの出力の停止を指示する。データ付加部54は、データ付加長分確保されると、パケットにデータを付加する。このようにパケットデータ処理群52がパイプライン処理によりパケットに対して処理を行い、パケットにデータを付加する必要があるときは、パケットデータの後段への出力を一時的に停止するのみなので、処理効率が落ちることなくパケットデータの付加をすることができる。
【0017】
【発明の実施の形態】
第1実施形態
図2は、本発明の第1実施形態によるパケットデータ処理装置の構成図である。図2に示すパケットデータ処理装置は、例えば、図25に示したネットワークのプライベートネットワーク40#A,40#Bと、インターネット等の共有ネットワーク42との間を接続するネットワークノード44#A,44#Bに適用されたものである。図2に示すように、パケットデータ処理装置60は、複数の受信インタフェースカード62#i(i=1〜n)、スイッチファブリック64及び複数の送信インタフェースカード66#i(i=1〜n)を有する。受信インタフェースカード62#i(i=1〜n)は、次の機能を有する。▲1▼パケットを該当するプライベートネットワーク、例えば、LANや共有ネットワークからパケットを受信する。▲2▼受信したパケットについて、パケットヘッダよりカプセル処理/デカプセル処理をする必要があるか否かを判断する。▲3▼カプセル処理/デカプセル処理をする必要があるとき、カプセル処理/デカプセル処理をする。尚、カプセル処理ではデータ付加処理、デカプセル処理ではデータ削除処理が行われる。▲4▼カプセル処理等をしたパケットをスイッチファブリック64に出力する。
【0018】
受信インタフェースカード62#iは、受信インタフェース部70#i、前段処理部72#i及びパケットデータ処理プロセッサ群74#iを有する。受信インタフェース部70#iは、物理インタフェースに従ってパケットを受信する。前段処理部72#iは、パケット処理プロセッサ群74#iがパケットにデータの付加/削除を行うための、パケットヘッダの検出等の前処理を行う。パケット処理プロセッサ群74#iは、複数のパケットデータ処理プロセッサがパイプライン構成されて、パケットに対する処理を行うものであり、例えば、次の機能を有する。▲1▼パケットヘッダより、パケットに対してデータの付加・削除をする必要が有るか否かを判断する。▲2▼パケットに対してデータを付加する必要が有ると判断した場合は、その付加すべきデータ、データ長、パケット上で付加すべき位置を求める。▲3▼パケットに対してデータを削除する必要が有ると判断した場合は、その削除すべきデータ長、パケット上で削除すべき位置を求める。▲4▼▲2▼,▲3▼で求められたデータ長等に基づいてデータの付加・削除をする。▲5▼データを付加する場合、付加対象パケットと前パケットとの間隔を少なくとも付加データ長分確保するために、データ付加処理を行うパケットデータ処理プロセッサの前段のパケット処理プロセッサがパケットデータの出力停止及び動作中のパケットデータ処理プロセッサの動作を停止する。▲6▼前パケットと付加データ長分の間隔が確保されたとき、前段のパケット処理プロセッサがパケットデータの出力再開及び動作を停止していたパケットデータプロセッサの動作再開をする。▲7▼データ付加・削除による変更後のパケット長をパケットヘッダに設定する。
【0019】
図3は、図2中のパケットデータ処理プロセッサ群74#iの構成図である。図3に示すように、パケット処理プロセッサ群74#iは、パケット以外の中間データを転送するバス88、パケットを転送するバス89、バス88,89によりパイプライン接続された複数のパケットデータ処理プロセッサ90#i(i=1〜n)及びバックプレッシャ信号線92により構成される。バス88,89は、中間データ及びパケットを転送するデータバスである。パケットデータ処理プロセッサ90#i(i=1〜n)は、バス88,89より入力された中間データ及びパケットデータを自身が有するシフトレジスタに保持して、パケットに対する所定の処理を行うものである。その段数は全体のパケット処理の内容に応じて任意に設定される。
【0020】
パケットデータ処理プロセッサ90#Aは、前段のパケットデータ処理プロセッサ群による指示に従ってデータの付加・削除を行う。具体的には、次の処理を行う。▲1▼前段のパケットデータ処理プロセッサ群の指示によって、パケットにデータの付加・削除が必要かどうかを判断する。▲2▼パケットにデータの付加が必要なときは、前段のパケット処理プロセッサ群の指示に基づいて、付加データ位置と付加データを特定し、データの付加処理を行う。▲3▼付加データ長に基づいて、付加データ長に相当するクロック数の時間、バックプレッシャ信号線92をアサートして、当該パケットデータ処理プロセッサよりも前段のパケットデータ処理プロセッサ群の動作を停止させる。▲4▼データの削除が必要なときは、前段のパケット処理プロセッサ群の指示に基づいて、削除データ位置と削除データ長を特定して、データの削除処理を行う。尚、▲3▼,▲4▼のパケットデータ処理プロセッサ90#Aの前段のパケットデータプロセッサ90#i(i=1,2,B,…)に対する動作停止・再開の制御は、パケットデータ処理プロセッサ群とは独立した制御部により行うようにしてもよい。また、バックプレッシャ信号線92をアサートし、パケットデータ処理プロセッサ群の動作を停止している期間、その前段(図2の構成では前段処理部72#i)は、バックプレッシャに従い、データ転送を一時停止する。
【0021】
図4は、図3中のパケットデータ処理プロセッサ90#Aの構成図である。図4に示すように、パケットデータ処理プロセッサ90#Aは、汎用レジスタ93#A、演算器94#A、中間データレジスタ96#A及びパケットアクセスレジスタ98#Aを有する。汎用レジスタ93#Aは、例えば、8個の32ビット長のレジスタr0〜r7である。演算器94#Aは、プログラムに記載された命令コードに従って演算を行うプロセッサであり、データ付加する場合は、付加データ長に応じた期間、バックプレッシャ信号線92をアサートする。中間データレジスタ96#Aは、パケットデータに同期して、該パケットデータに関する処理結果を保持し伝達するための、例えば、16段の32ビットのシフトレジスタレジスタe0〜e15である。中間データレジスタ96#Aに保持されるデータとしては、例えば、パケットの先頭を示すデータ、データの付加・削除の必要の有無を示すフラグビット、付加データ、付加データ位置、付加データ長、削除データ位置、削除データ長である。パケットアクセスレジスタ98#Aは、パケットデータを直接取り込むための、例えば、16段の32ビットのシフトレジスタレジスタp0〜p15である。
【0022】
パケットデータ処理プロセッサ90#Aよりも前段のパケットデータ処理プロセッサ90#Bは、次の処理を行う。▲1▼パケットヘッダよりパケットに対してデータを付加・削除する処理を行う必要が有るか否かを判断する。▲2▼パケットに対してデータを付加する必要が有ると判断した場合は、その付加すべきデータ、データ長、パケット上で付加すべき位置を求める。▲3▼パケットに対してデータを削除すると判断した場合は、その削除すべきデータ長、パケット上で削除すべき位置を求める。▲4▼▲1▼〜▲3▼により得られた中間データをデータバス上に出力する。▲5▼バックプレッシャ信号線92がアサートされると、パケットデータ及び中間データのシフト動作の停止及びパケット処理中であれば処理を停止する。▲6▼バックプレッシャ信号線92がネゲートされると、パケットデータ及び中間データのシフト動作の再開及び停止していた処理の再開をする。
【0023】
図5は、図3中のパケットデータ処理プロセッサ90#Bの構成図である。パケットデータ処理プロセッサ90#Bは、バックプレッシャ信号線92がアサートされると、例えば、バックプレッシャ信号に基づいて、システムクロックを停止することにより、演算器94#B、中間データレジスタ96#B及びパケットアクセスレジスタ98#Bの動作を停止する。汎用レジスタ93#B、演算器94#B、中間データレジスタ96#B及びパケットアクセスレジスタ98#Bは、図4中のものと実質的に同一である。パケットデータ処理プロセッサ90#Aの前段のパケット処理プロセッサ90#i(i=1,2,…)の構成は、パケットデータ処理プロセッサ90#Bと実質的に同一である。また、パケットデータ処理プロセッサ90#Aの後段のパケット処理プロセッサ90#Cの構成は、バックプレッシャ信号線92に従って動作を停止する必要がない点を除きパケットデータ処理プロセッサ90#Bと実質的に同一であり、例えば、中間データに従って、データ付加・削除が行われたときは、パケットヘッダ中のパケット長情報を更新する。
【0024】
図2中のスイッチファブリック64は、受信インタフェースカード62#i(i=1〜n)よりパケットを入力して、パケットのヘッダに設定されているIPアドレス又はMACアドレスに従って、ルーティングテーブルを参照して該当する送信インタフェースカード66#k(k=1〜n)にルーティングする。但し、ルーティングテーブル参照処理をパケット処理プロセッサ群74#iにて行い、スイッチファブック64はこの処理結果に従い決められた送信インタフェースカード66#k(k=1〜n)にルーティングする実装でも良い。送信インタフェースカード66#iは、送信インタフェース部80#iを有する。送信インタフェース部80#iは、スイッチファブリック64よりパケットを入力して、伝送路の物理インタフェースに従ってパケットを送信する。以下、図2のパケットデータ処理装置50の動作説明をする。
【0025】
(1) 受信インタフェースカード62#iの動作
各受信インタフェースカード62#i中の受信インタフェース部70#iは、伝送路より所定の物理インタフェースに従ってパケットデータを受信して、前段処理部72#iにパケットデータを出力する。前段処理部72#iは、パケットデータの32ビットパラレルデータにシリアル/パラレル変換して、パケットアクセスレジスタ96#1に接続されるデータバスに出力する。パケットヘッダを検出してヘッダを示すフラグを中間データレジスタ96#1に接続されるデータバスにパケットに同期して出力する。パケットデータ処理プロセッサ群74#i中の各パケットデータ処理プロセッサ90#j(j=1,2,…)は、パケットがパケットアクセスレジスタ98#jに格納されると、中間データレジスタ96#jに格納された中間データに従ってパケットに対してそれぞれの処理を行う。また、パケット処理プロセッサ群74#iからバックプレッシャ信号によりバックプレッシャを通知されている期間はデータ出力を停止する。
【0026】
(a) データ付加・削除の判断
パケットデータ処理プロセッサ90#Bは、パケットに対してデータを付加・削除する処理を行うか否かをパケットのヘッダより判断する。パケットに対してデータを付加すると判断した場合は、その付加すべきデータ、データ長、パケット上で付加すべき位置を求める。パケットに対してデータを削除すると判断した場合は、その削除すべきデータ長、パケット上で削除すべき位置を求める。付加/削除を行うか否かを示すフラグビット、データ付加する場合は、付加するデータ、付加するデータ長、付加するデータのパケット上での位置、削除する場合は、削除するデータ長、削除するデータのパケット上での位置をパケットに同期して中間データレジスタ96#Bに書き込む。パケットデータ及び中間データは、クロックに同期して、パケット処理プロセッサ群74#i中のパケットアクセスレジスタ、中間データレジスタ及びデータバスにより転送される。
【0027】
(b) パケットデータ処理プロセッサ90#Aの動作
パケットデータ処理プロセッサ90#Aは、パケットがパケットアクセスレジスタ98#Aに入力されると起動される。パケットがパケットアクセスレジスタ98#Aに入力されると、パケットに同期して中間データレジスタ96#Aに入力された前段のパケットデータ処理プロセッサの指示によって、パケットにデータの付加・削除が必要かどうかをフラグビットにより判断する。フラグビットより付加が必要である場合には、付加するデータ、付加データ長、パケット上での付加位置を中間データレジスタ96#Aより得る。また、削除が必要である場合には、削除データ長、パケット上での削除位置を中間データレジスタ96#Aより得る。ここでは、パケットの先頭から32ビット目に64ビットのデータを付加するように指示されていたとする。
【0028】
(b−1) データの付加
図6は、データ付加の判断後のパケットデータ処理プロセッサ90#Aを示す図である。パケットアクセスレジスタ98#AのレジスタP3にデータ付加すべきパケットの先頭データが格納されているとする。また、このパケットの前パケットの最終データがレジスタP4に格納されているとする。パケットデータ処理プロセッサ90#Aは、自分より前段のパケットデータ処理プロセッサに対して、パケットアクセスレジスタのシフトを行わないように、付加データ長に相当するクロック時間、バックプレッシャ信号線92をアサートすると共にデータ付加対象パケットが格納されているパケットアクセスレジスタ98#Aのレジスタのシフト動作を停止する。データ付加対象パケットの前パケットが格納されているパケットアクセスレジスタ98#Aのレジスタについてはシフト動作を行う。ここでは、パケットアクセスレジスタ98#AのレジスタP3にデータ付加対象パケットの先頭が格納されているので、レジスタP3−P0のシフト動作が停止される。一方、レジスタP4〜P15のシフト動作は継続する。
【0029】
一方、パケットデータ処理プロセッサ90#Aよりも前段のパケットデータ処理プロセッサ90#i(i=1,2,B,…)は、バックプレッシャ信号線92がアサートされると、演算部、パケットアクセスレジスタ及び中間データレジスタの動作を停止するべく、例えば、システムクロックをネゲートする。ここでは、付加データの大きさが64ビットであること及びパケットアクセスレジスタ98#Aが32ビットであることから、データ付加対象パケット及び後続パケットデータを64÷32=2クロックの間データ転送を停止し、それよりも前にあるパケットデータはデータ転送を継続しなければならない。そのため、レジスタP3よりも後にあるパケットデータの転送を2クロック停止し、レジスタP4のデータよりも前のパケットデータの転送を継続して行う。
【0030】
図7は、2クロック後のパケットデータ処理プロセッサ90#Aを示す図である。図7に示すように、2クロック後には、データを付加すべき位置であるパケット先頭から32ビット目のレジスタP4,P3に空きが確保される。そして、2クロック停止させなければいけないと判断したパケットデータ処理プロセッサ90#Aは、2クロック経過するとパケットのシフトを再開させて良いので、パケットアクセスレジスタ98#Aのシフト動作を再開すると共に、バックプレッシャ信号線92をネゲートしてパケットデータ処理プロセッサ90#Aより前にあるパケットデータ処理プロセッサにシフトの再開するよう指示する。バックプレッシャ信号線92がネゲートされると、パケットデータ処理プロセッサ90#Aの前段のパケットデータ処理プロセッサがシフト動作を再開する。命令を中断していたパケットデータ処理プロセッサは、中断していた命令を再開する。パケットデータ処理プロセッサ90#Aは、パケットアクセスレジスタ98#Aに格納されている、パケット先頭データからデータを付加するべき位置の直前のデータまで付加データ長だけ移動する。その後、中間データレジスタ96#Aに格納されている付加するデータをパケットアクセスレジスタ98#Aの付加するべき位置のレジスタに格納する。そして、パケットに同期する中間データレジスタ96#Aのデータも必要に応じて移動する。
【0031】
図8は、データ移動後のパケットデータ処理プロセッサ90#Aの状態を示す図である。ここでは、パケット先頭から32ビット目に付加するので、32ビット目よりも前にある32ビットのデータが格納されているレジスタP3のデータを64ビット移動する。即ち、レジスタP3のデータ手をレジスタP5に移動する。その後、64ビットの空いた場所、レジスタP3,P4に中間データレジスタ96#Aに格納されている付加データを付加する。付加されたパケットはパケットアクセスレジスタ98#Aのシフト動作によって後段のパケットデータ処理プロセッサ群に転送される。
【0032】
(b−2) データ削除
フラグビットより削除が必要である場合には、削除データ長、パケット上での削除位置を中間データレジスタ96#Aより得る。削除対象のパケットについて、パケットアクセスレジスタ98#Aに格納されている削除位置よりも前のデータを削除データ長後ろに移動する。例えば、パケット上での削除位置がパケット先頭から32ビット目、削除データ長が64ビット、パケット先頭がレジスタP3に格納されているとき、レジスタP3に格納されている32ビットのデータを64ビット移動、即ち、レジスタP1に移動する。このとき、パケットに同期する中間データレジスタ96#Aのデータも必要に応じて移動する。削除されたパケットはパケットアクセスレジスタ98#Aのシフト動作によって後段のパケットデータ処理プロセッサ群に転送される。
【0033】
(c) パケットデータ処理プロセッサ90#Aの後段のパケットデータ処理プロセッサ群の動作
後段のパケットデータ処理プロセッサ群は、バス88,89よりパケットデータ及び中間データを受け取って、パケット処理、例えば、パケットデータ処理プロセッサ90#Aによりデータ付加・削除されたとき、パケットのヘッダ長の更新処理を行って、最終段のパケットデータ処理プロセッサ90#Cよりスイッチファブリック64にパケットを出力する。
【0034】
(2) スイッチファブリック64の動作
スイッチファブリック64は、受信インタフェースカード62#i(i=1〜n)からパケットを入力して、パケットのヘッダに設定されているIPアドレス又はMACアドレスに従って、ルーティングテーブルを参照して該当する送信インタフェースカード66#k(k=1〜n)にルーティングする。但し、ルーティングテーブル参照処理をパケット処理プロセッサ群74#iにして行い、スイッチファブリック64はこの処理結果に従い決定された送信インタフェースカード66#k(k=1〜n)にルーティングする実装でも良い。
【0035】
(3) 送信インタフェースカード66#iの動作
送信インタフェースカード66#iは、スイッチファブリック64よりパケットを入力して、伝送路の物理インタフェースに従ってパケットを送信する。
【0036】
以上のようにして、パケットデータ処理プロセッサ群がパケットにデータの付加・削除が必要かを判断し、付加・削除に必要なデータを生成する。パケットデータ処理プロセッサAはかかるデータを受け取り、データの付加処理によってパケット間隔を空ける必要があるかどうかを判断し、必要であれば前段にあるパケットデータ処理プロセッサ群にパケットの入力を制限してもらうことによって、付加するデータの大きさから判断されたパケット間隔を空け、パケット処理のスループットを下げずに、データの付加処理を行うことができる。
【0037】
第2実施形態
図9は、本発明の第2実施形態によるパケットデータ処理装置の構成図であり、図2中の構成要素と実質的に同一の構成要素には同一の符号を附している。図9に示すパケットデータ処理装置100は、受信インタフェースカード104#i中のパケットデータ処理プロセッサ群104#iが図2中のパケットデータ処理プロセッサ群74#iと異なる。パケットデータ処理プロセッサ群104#iは、付加・削除データ長がパケットデータ処理プロセッサのパケットアクセスレジスタのビット幅の倍数でない場合にもデータの付加・削除を行うことができること、データ付加をするパケットデータ処理プロセッサにパケットデータ及び中間データを保持するバッファメモリを設け、データ付加のときに常にシフト動作を停止するのではなく、バッファがデータ付加により足りなくなったときのみシフト動作を停止するようにしたことが図2中のパケットデータ処理プロセッサ群74#iと異なる。
【0038】
図10は、図9中のパケットデータ処理プロセッサ群104#iの構成図であり、図3中の構成要素と実質的に同一の構成要素には同一の符号を附している。バス108,109及びパケットデータ処理プロセッサ110#iは、データ付加・削除機構部112の動作の特徴を明確にするため、バス108,109並びにパケットアクセスレジスタ及び中間データレジスタのビット幅が図3中のバス88,89及びパケットデータ処理プロセッサ90#iと変えた例としている。
【0039】
図11は、図10中のパケットデータ処理プロセッサ110#iの構成図であり、図5中の構成要素と実質的に同一の構成要素には同一の符号を附している。中間データレジスタ120#iは、パケットデータに同期して、該パケットデータに関する処理結果を保持し伝達するための、例えば、4段の64ビットのシフトレジスタレジスタe0〜e3である。パケットアクセスレジスタ122#iは、パケットデータを直接取り込むための、例えば、4段の128ビットのシフトレジスタレジスタp0〜p3である。データ付加・削除機構部112は、図3中のパケットデータ処理プロセッサ90#Aと同様にデータの付加・削除を行う。データ付加・削除機構部112は、例えば、専用ハードウェアにより構成する。
【0040】
図12は、図10中のデータ付加・削除機構部112の構成図である。図12に示すようにデータ付加・削除機構部112は、データ長チェック部120、伸縮バッファ122、リオーダ部124、書込データ抽出部126及びデータライト部128を有する。データ長チェック部120は、パケットデータ及び中間データより、データ付加・削除後のデータの全長を求め、許容されるパケットの最大長を超えないかをチェックする。超えている場合は、エラーを出力する。
【0041】
伸縮バッファ122は、パケットデータ及び中間データを格納するパケットデータメモリ及び中間データメモリ、並びにこれらのメモリを制御するコントローラから構成されている。各メモリはFIFO(First In First Out)バッファである。パケットデータメモリは、パケットアクセスレジスタ122#iと同じデータビット幅、例えば、128ビット幅のメモリ領域から成るFIFOである。中間データバッファは、中間データレジスタ120#iと同じデータビット幅、例えば、64ビット幅のFIFOである。
【0042】
コントローラは、次の機能を有する。▲1▼中間データバッファからフラグビットを読み出して、データ付加・削除の必要があるか否かをチェックする。▲2▼データ削除の必要がある場合は、バス幅単位でデータ削除を行う。バス幅単位で削除可能なときは、バス幅単位で削除を行う。データ削除は、パケットデータメモリ上でデータの移動をすることによっても行うことができるが、パケット処理の高速化の観点からは、パケットデータのパケットデータメモリへの書き込み処理と並列して削除対象のデータの読み込みをスキップし、削除対象外のデータを読み込むことにより実現するのが望ましい。但し、バス幅単位にデータ削除が行われるので、データ削除長がバス109のバス幅の整数倍でないとき、データ削除長がバス幅の整数倍であってもデータ削除位置がバス109上で先頭でないとき、削除できないデータが残ることになるが、このデータはリオーダ部124により削除する。▲3▼データ付加の必要がある場合は、(i)中間データにある付加データの大きさと、パケットデータメモリの空き容量からパケットデータメモリが足りるかを判断し、足りなくなってしまう場合には、足りないメモリ容量に相当するクロック時間だけバックプレッシャ信号線92をアサートする。データの付加処理では、データのバス幅単位に同一データのコピーを行っており、パケットデータメモリが足りなくなる恐れがあるからである。(ii)バス幅単位でバス幅単位でデータ伸張を行う。データ伸張とは、データを付加する領域を確保することをいう。データ伸張は、パケット処理の高速化の観点より、パケットデータのパケットデータメモリへの書き込み処理と並列的にパケット上での付加位置にあるデータをバス幅単位で複数回数(付加データの大きさ÷バス幅(余りがあれば切り上げ))読み出すことにより実現する。但し、データ伸張はバス幅単位に行われるので、データ付加長がバス幅の整数倍でないとき、データ付加位置がバス109の先頭でないとき、データ付加長を超えて余分なデータ領域が確保されるが、余分なデータ削除はリオーダ部124が行う。
【0043】
リオーダ部124は、次の機能を有する。▲1▼データ付加・削除を行わないときは、付加・削除バッファ122から読み出されたデータをそのままデータライト部128に出力する。▲2▼データ付加・削除するとき、データ削除では削除されていないデータ及びデータ付加では余分なデータを削除する。
【0044】
図13は、図12中のリオーダ部124の構成図である。リオーダ部124は、3段の128ビットのシフトレジスタ130#0,130#1,130#2、リオーダ制御シーケンサ132及びセレクタ134#i(i=0〜7)を有する。シフトレジスタ130#iはバッファ122より出力される128ビット幅のパケットデータをシフトするレジスタであり、例えば、8個の16ビットのレジスタ131#ij(j=0〜7)から構成される。レジスタ131#ijを16ビットとしたのは、ここではデータ付加/削除のデータ単位を16ビットとしているからである。シフトレジスタ130#i(i=0〜2)を3段としたのは、128ビットのパケットデータを16ビットで区切ったとき、128ビット単位で伸縮しているので、(k=0〜7)番目の16ビットデータに上書きされるデータは、最大で14個後の16ビットのデータであるからである。
【0045】
リオーダ制御シーケンサ132は、次の機能を有する。▲1▼中間データのフラグビットよりデータ付加・削除の必要があるか否かを判断する。▲2▼データ付加・削除の必要がない場合は、セレクタ134#i(i=0〜7)にレジスタ131#0iの16ビット出力を選択するよう選択信号=0を出力する。▲3▼データ付加・削除の必要がある場合、(i)不要なビットを削除することが必要なデータが最終段のシフトレジスタ130#0に出力されるまでは、セレクタ134#i(i=0〜7)に選択信号=0を出力する。(ii)不要なビットを削除することが必要なデータが最終段のシフトレジスタ130#0に出力されたクロックでは、削除対象データよりも前のデータ位置のセレクタ134#iに選択信号=0を出力する。削除対象データとは、データ削除が指示された場合の削除対象となるデータ及びデータ伸張による余分なデータをいう。データの削除・付加されないとき、シフトレジスタ130#0iの出力データとセレクタ134#iとが対応する。(iii)削除位置から後ろのデータについては、削除量分、後方のデータを選択するよう指示する選択信号を出力する。例えば、16×kビット削除する場合は、選択信号=kである。
【0046】
セレクタ134#iは、シフトレジスタ131#0iの出力信号及び14個後までのシフトレジスタの出力信号の16×15ビットの出力信号が入力されて、選択信号=0であるとき、シフトレジスタ131#0iの出力信号を選択し、選択信号=k(k≠0)であるとき、k個後ろのレジスタから出力される信号を選択する。例えば、セレクタ134#0は、レジスタ131#0j(j=0〜7)及びレジスタ131#1j(j=0〜6)の出力信号が入力されて、0≦k≦7のとき、レジスタ131#0kの出力信号を選択し、8≦k≦14のとき、シフトレジスタ131#1(k−8)の出力信号を選択する。
【0047】
図12中の書込データ抽出部126は、フラグビットよりデータ付加の必要があるか否かを判断して、データ付加の必要がある場合は、付加データを中間バッファメモリより抽出して、データライト部128に出力する。データライト部128は、データ付加の必要がある場合は、128ビット単位でリオーダ部124よりデータ付加の必要のあるデータが出力されると、該当する付加データで上書きする。以下、図9のパケットデータ処理装置100の動作説明をする。
【0048】
(1) 受信インタフェースカード102#iの動作
各受信インタフェースカード102#i中の受信インタフェース部70#i及び前段処理部72#iは、第1実施形態と同様に動作する。
【0049】
(a) データ付加・削除の判断
データ付加・削除機構部112よりも前段のパケットデータ処理プロセッサ110#1,…,110#Bは、図3中のパケットデータ処理プロセッサ90#Aよりも前段のパケット処理プロセッサ90#1,…,90#Bと同様の処理を行う。パケットデータ処理プロセッサ110#Bは、パケットデータ処理プロセッサ90#Bと同様に、パケットに対してデータを付加・削除する処理を行うか否かをパケットのヘッダより判断して、データ付加・削除に関わる中間データを中間データレジスタ120#Bに書き込む。
【0050】
(b) データ付加・削除機構部112の動作
データ長チェック部120は、パケットヘッダ及び中間データよりデータ付加・削除後のデータの全長を求め、パケットの最大長を超えないかをチェックする。パケットの最大長を超えたとき、エラーを出力する。伸張・削除バッファ122は、パケットデータをパケットデータメモリに、中間データを中間データメモリに書き込む。中間データのフラグビットよりデータ付加・削除の必要があるか否かを判断する。
【0051】
(b−1) データ付加・削除の必要がない場合
伸縮バッファ122は、パケットデータメモリよりパケットデータを読み出してリオーダ部124に出力する。リオーダ部124中のシフトレジスタ130#i(i=2,1,0)は、パケットデータをシフトする。リオーダ制御シーケンサ132は、選択信号=0をセレクタ134#i(i=0〜7)に出力する。セレクタ134#iはシフトレジスタ131#0iより出力されるデータを選択してデータライト部128に出力する。データライト部128は、リオーダ部124より出力されるデータを出力する。
【0052】
(b−2) データ付加の必要がある場合
伸縮バッファ122は、中間データにある付加データの大きさとパケットメモリの空き容量からパケットデータメモリが足りるかを判断し、足りなくなってしまった場合には、足りないクロック時間だけバックプレッシャ信号線92をアサートする。バックプレッシャ信号線92がアサートされると、データ付加・削除機構部112よりも前段のパケットデータ処理プロセッサ群はシフト動作を停止すると共に実行中の命令位置で命令を中断する。伸縮バッファ122は、付加データの指定開始位置を含むバス幅単位でのデータまでデータメモリより読み出す。付加データ指定開始位置を含むバス幅単位でのデータを付加データの大きさ÷バス幅(余りがあれば切り上げ)回コピーする。
【0053】
図14は、バス幅が128ビット、付加データの大きさが64ビット、指定開始位置が32ビットの時の伸張動作を示す図であり、特に、同図(a)はデータ伸張前の状態を示す図、同図(b)はデータ伸張後の状態を示す図である。図14(a)に示すように、データ付加位置が32ビット目であるとき、伸縮バッファ122は、データ付加位置の含む128ビットのデータを64÷128=1(余りを切り上げ)回コピーする。このとき、データが64=(128−64)ビット余分にコピーされているので、後述するようにリオーダ部124よりこの余分なデータを削除する。
【0054】
伸縮バッファ122で伸縮が行われたパケットはリオーダ部124に入力される。リオーダ部124中のシフトレジスタ130#i(i=2,1,0)は、入力されたパケットデータをクロックに同期してシフトする。リオーダ制御シーケンサ132は、中間データより示される指定開始位置に従って、不要なビットを削除することが必要なデータが最終段のシフトレジスタ130#0に出力されるまでは、セレクタ134#i(i=0〜7)に選択信号=0を出力する。不要なビットを削除することが必要なデータが最終段のシフトレジスタ130#0に出力されたクロックでは、削除対象データよりも前のデータ位置のセレクタ134#iに選択信号=0を出力する。指定開始位置のデータを含む後ろのデータについては、削除量分、後方のデータを選択するよう指示する選択信号を出力する。削除ビット数=(伸長されたビット数−データ付加ビット数)である。
【0055】
図15は、データ付加時のリオーダ部124の動作を示す図であり、特に同図(a)はリオーダ部124の入力、同図(b)はリオーダ部124の出力を示している。図15では、バス幅が128ビットで付加データの大きさが64ビット、指定開始位置が32ビットの時の動作を示している。削除されるデータ長=128−(64÷128での余り)=64ビットである。よって、削除量=64÷16=4ワードである。リオーダ部124は、データ付加位置のデータまでは、入力されたデータをスルーする。データ付加位置のデータを含む以降のデータは、4ワード後方のデータを選択して通す。
【0056】
書込データ抽出部126は、中間データより付加データを読み出し、データライト部128に出力する。データライト部128は、書込データ抽出部126で中間データから抽出した付加データによってデータ付加位置からのデータに上書きする。
【0057】
(b−3) データ削除の必要がある場合
伸縮バッファ122は、バス幅単位でのデータの収縮を行う。即ち、まず、パケットの先頭データから削除データ開始位置のデータを含むバス幅単位のデータまでバケットデータメモリより読み出す。次に削除データ最終位置のデータを含むバス幅単位のデータをパケットデータメモリより読み出し、削除データ開始位置のデータの次のバス幅単位のデータから削除データ最終位置のデータの前のバス幅単位のデータまでを読み飛ばすことにより、バス幅単位にデータの収縮を行う。
【0058】
図16は、バス幅単位のデータの収縮を示す図であり、特に、同図(a)はデータ収縮前の状態を示す図、同図(b)はデータ収縮後の状態を示す図である。る。図16では、バス幅が128ビット、削除データの大きさが160ビット、指定開始位置が112ビットである。このパケットデータをバス幅単位に収縮すると、図16(b)に示すように、128ビット目から128ビットのデータが削除される。
【0059】
図17は、バス幅単位のデータの収縮の他の場合を示す図であり、特に、同図(a)はデータ収縮前の状態を示す図、同図(b)はデータ収縮後の状態を示す図である。図17では、バス幅が128ビット、削除データの大きさが160ビット、指定開始位置が64ビットである。図17(a)に示すように、削除データの大きさが128ビットを超える場合でも、バス幅単位にデータを収縮できないときがある。
【0060】
伸縮バッファ122でバス幅単位に縮小されたパケットはリオーダ部124に入力される。リオーダ部124中のシフトレジスタ130#i(i=2,1,0)は、入力されたパケットデータをクロックに同期してシフトする。リオーダ制御シーケンサ132は、指定開始位置に従って、不要なビットを削除することが必要なデータが最終段のシフトレジスタ130#0に出力されるまでは、セレクタ134#i(i=0〜7)に選択信号=0を出力する。不要なビットを削除することが必要なデータが最終段のシフトレジスタ130#0に出力されたクロックでは、削除対象データよりも前のデータ位置のセレクタ134#iに選択信号=0を出力する。指定開始位置のデータを含む後ろのデータについては、削除量分、後方のデータを選択するよう指示する選択信号を出力する。削除ビット量=削除データビット長−収縮ビット長である。
【0061】
図18は、データ削除時のリオーダ部124の動作を示す図であり、特に同図(a)はリオーダ部124の入力、同図(b)はリオーダ部124の出力を示している。図17では、バス幅が128ビットで削除データの大きさが160ビット、指定開始位置が112ビットの時の動作を示している。削除されるデータ長は、指定開始位置から160÷128の余り=32ビットのデータである。図17(b)に示すように、データ削除位置の前のデータについては、伸縮バッファ122データから出力されるデータをスルーして通す。データ削除位置のデータを含む後ろのデータについては、32ビット=2ワード(32÷16=2)後ろのデータを選択して通す。
【0062】
図19は、データ削除時のリオーダ部124の他の場合の動作を示す他の図であり、特に同図(a)はリオーダ部124の入力、同図(b)はリオーダ部124の出力を示している。図19では、バス幅が128ビットで削除データの大きさが160ビット、指定開始位置が64ビットの時の動作を示している。削除されるデータは、指定開始位置から、160÷128の余り+128=160ビットのデータである。図19(b)に示すように、データ削除位置の前のデータについては、伸縮バッファ122データから出力されるデータをスルーして通す。データ削除位置のデータを含む後ろのデータについては、160ビット=10ワード(160÷16=10)後ろのデータを選択して通す。データライト部128は、削除されたパケットデータをスルーして通す。
【0063】
(c) 後段のパケットデータ処理プロセッサ群の動作
データ付加・削除機構部112の後段のパケットデータ処理プロセッサ群110#C…は、第1実施形態のパケットデータ処理プロセッサ90#Cと同様の処理を行って、最終段のパケットデータ処理プロセッサ110#nよりスイッチファブリック64にパケットを出力する。
【0064】
(2) スイッチファブリック64の動作
スイッチファブリック64は、受信インタフェースカード62#i(i=1〜n)からパケットを入力して、パケットのヘッダに設定されているIPアドレス又はMACアドレスに従って、ルーティングテーブルを参照して該当する送信インタフェースカード66#k(k=1〜n)にルーティングする。但し、ルーティングテーブル参照処理をパケット処理プロセッサ群104#iにて行い、スイッチファブリック64はこの処理結果に従い決定された送信インタフェースカード66#k(k=1〜n)にルーティングする実装でも良い。
【0065】
(3) 送信インタフェースカード66#iの動作
送信インタフェースカード66#iは、スイッチファブリック64よりパケットを入力して、伝送路の物理インタフェースに従ってパケットを送信する。
【0066】
以上のように、パケットデータ処理プロセッサに、特殊なパケットデータ処理プロセッサとして、バッファ機能を持ったデータの付加・削除機構にデータの付加・削除を行わせることにより、バス幅を気にしないデータの付加・削除を行うことができる。また、データの付加が起こるたびにパケットデータ処理プロセッサ群のデータのシフトを停止させるのではなく、バッファの空き容量がなくなったときに初めてデータのシフトを停止させることによって、パイプラインの停止回数を減らすことができる。
【0067】
第3実施形態
図20は、本発明の第3実施形態によるパケットデータ処理装置の構成図であり、図9中の構成要素と実質的に同一の構成要素には同一の符号を附している。図20に示すパケットデータ処理装置140は、受信インタフェースカード142#i中のパケットデータ処理プロセッサ群144#iが図9中のパケットデータ処理プロセッサ群104#iと異なる。パケットデータ処理プロセッサ群144#iは、初段にパケットデータ及び中間データを蓄積するバッファを設けていること、バックプレッシャ信号は初段のパケットデータ処理プロセッサのみに入力するようにしたこと、データ付加・削除機構部の前段のパケットデータ処理プロセッサ群はデータ付加・削除機構部がデータ付加処理を行っている際にもパケットデータ処理を停止せずに継続することが図9中のパケットデータ処理プロセッサ群104#iと異なる。
【0068】
図21は、図20中のパケットデータ処理プロセッサ群144#iの構成図であり、図10中の構成要素と実質的に同一の構成要素には同一の符号を附している。バッファ150は、次の機能を有する。(i)クロックに同期してパケットデータ及び中間データを入力して、FIFOメモリに書き込む。(ii)FIFOメモリに保持されたパケットデータ及び中間データを読み込み、バス108,109に出力する。(iii)バックプレッシャ信号線92がアサートされると、FIFOメモリからパケットデータ及び中間データの読み込みを停止する。FIFOメモリからの読み込みが停止されている間にも、パケットデータ及び中間データの書き込みが行われるので、FIFOメモリが不足しないように、読み込み停止されている間に書き込まれるパケットデータに応じて、FIFOメモリ容量が決定される。(iv)バックプレッシャ信号線92がネゲートされると、FIFOメモリからパケットデータ及び中間データの読み込みを再開する。
【0069】
データ付加・削除機構部154よりも前段のパケットデータ処理プロセッサ152#i(i=1〜B)は、バックプレッシャ信号線92が入力されることがないので、データ付加・削除機構部154がデータ付加処理を実行している間もパケット処理を停止することがない。データ付加・削除機構部154は、図12に示したデータ付加・削除機構部112の構成と異なることはなく、図12中のバッファ122が不足しそうになると、バックプレッシャ信号線92をアサートする。しかし、バックプレッシャ信号線92がパケットデータ処理プロセッサ152#iには入力されずに、バッファ150に入力されるので、パケットデータ処理プロセッサ152#iの動作は停止しないため、パケットデータ処理プロセッサ152#iにあるパケットデータは、バックプレッシャ信号線92をアサートしている間にも入力される。
【0070】
よって、バックプレッシャ信号線92をアサートしたとき、パケットデータ処理プロセッサ152#iにあるパケットがすべて入力されても図12中と同様に構成される伸縮バッファがあふれないだけのバッファの空き容量がなければならない。バックプレッシャ信号線92をアサートすることにより、伸縮バッファに十分な空きが生じたとき、データ付加・削除機構部154は、バッファ150にパケットの入力再開をするべくバックプレッシャ信号線92をネゲートする。以下、図20のパケットデータ処理装置140の動作説明をする。
【0071】
(1) 受信インタフェースカード142#iの動作
各受信インタフェースカード142#i中の受信インタフェース部70#i、前段処理部72#iは、第1実施形態と同様に動作する。
【0072】
(a) パケットデータの書き込み・読み込み
バッファ150は、クロックに同期してパケットデータ及び中間データを入力して、FIFOメモリに順次書き込む。バックプレッシャ信号線92がネゲートされているとき、FIFOメモリに保持されたパケットデータ及び中間データを読み込み、次段のパケットデータ処理プロセッサ群に出力する。
【0073】
(b) データ付加・削除の判断
データ付加・削除機構部150よりも前段のパケットデータ処理プロセッサ152#1,…,152#Bは、図3中のパケットデータ処理プロセッサ90#Aよりも前段のパケット処理プロセッサ90#1,…,90#Cと同様の処理を行う。パケットデータ処理プロセッサ152#Bは、パケットデータ処理プロセッサ90#Bと同様に、パケットに対してデータを付加・削除する処理を行うか否かをパケットのヘッダより判断して、データ付加・削除に関わる中間データを中間データレジスタに書き込む。
【0074】
(c) データ付加・削除機構部154の動作
データ付加・削除機構部154は、第2実施形態と同様のデータ付加・削除処理を行う。データ伸張をするとき、図12中のバッファ122と同様に構成されたバッファが不足しそうになると、バックプレッシャ信号線92をアサートする。このとき、バックプレッシャ信号線92がパケットデータ処理プロセッサ152#iには入力されずに、バッファ150に入力されるので、パケットデータ処理プロセッサ152#i(i=1,2,…,B)は停止しないため、データ付加・削除機構部154がバックプレッシャ信号線92をアサートしている間にも、パケットデータ処理プロセッサ152#i(i=1,2,…,B)にあるパケットデータはバックプレッシャ信号線92をアサートしている間にもデータ付加・削除機構部150は停止することなく動作する。
【0075】
パケットデータ処理プロセッサ152#iが停止しないということは、例えば、ある命令実行後2クロック過ぎたときに外部からデータが渡され、そのデータを元にパケットデータ処理プロセッサ152#iが処理を行うといったようなある処理から固定クロック後に必ずある処理を行わなければならないので、パケットデータ処理プロセッサ152#iが停止できない。このような場合にもパケットデータの付加処理が可能になる。そして、バックプレッシャ信号線92をアサートすることにより、バッファ122に十分な空きが生じたとき、データ付加・削除機構部154は、バッファ150にパケットの入力再開をするべくバックプレッシャ信号線92をネゲートする。尚、この実施形態では構成としてバックプレッシャに対応するバッファ150をパケットデータ処理プロセッサ群144#i中に持つとしたが、前段処理部72#iがバッファを持つ構成である場合には前段処理部72#iがバッファ150の機能を兼ねても良い。
【0076】
本発明は以下の付記を含むものである。
【0077】
(付記1) それぞれが入力されたパケットに対して処理をして後段に出力するパイプライン構成された複数のパケットデータ処理部から構成されるパケットデータ処理群を有するパケットデータ処理装置において、
入力されたパケットに前記付加すべきデータを付加する前記パケットデータ処理群中の第1パケットデータ処理部に設けられたデータ付加部と、
前記データ付加部がデータ付加処理をしている間は、前記第1パケットデータ処理部の前段にパケットの出力の停止を指示し、前記データ付加部がデータ付加処理終了後、前記第1パケットデータ処理部の前段にパケットの出力を再開するよう指示する制御部と、
を具備したことを特徴とするパケットデータ処理装置。
【0078】
(付記2) 前記制御部は、前記第1パケットデータ処理部の前段の全てのパケットデータ処理部に対してパケットの出力の停止及び再開を指示し、前記第1パケットデータ処理部の前段のパケッデータ処理部は、前記制御部からの指示に基づいてパケットの出力の停止及び再開をすることを特徴とする付記1記載のパケットデータ処理装置。
【0079】
(付記3) 前記第1パケットデータ処理部の前段の前記パケットデータ処理群中の第2パケットデータ処理部は、入力されたパケットに基づいてデータを付加する必要が有るか否かを判断する判断部と、前記判断部がデータを付加する必要が有ると判断したとき、入力されたパケットに基づいて、付加データ、付加データ長及び付加位置を算出して、後段に出力する付加情報生成部とを更に具備し、前記データ付加部は、前記付加データ、付加データ長及び付加位置に基づいて、データを付加することを特徴とする付記1記載のパケットデータ処理装置。
【0080】
(付記4) 前記データ付加部は、プロセッサ、前記パケットを保持する第1ビット幅の第1段数の第1シフトレジスタ、前記付加データ、前記付加データ長及び前記付加位置を保持する第2ビット幅の第2段数の第2シフトレジスタを有し、前記付加位置よりも後ろに位置するパケットデータを前記付加データ長に基づき前記第1シフトレジスタのシフト動作の停止及び前記第1シフトレジスタの所定レジスタに前記付加データを書き込むことによりデータ付加を行うことを特徴とする付記3記載のパケットデータ処理装置。
【0081】
(付記5) それぞれが入力されたパケットに対して処理をして後段に出力するパイプライン構成された複数のパケットデータ処理部から構成されるパケットデータ処理群を有するパケットデータ処理装置において、
前記パケットデータ処理群中の第1パケットデータ処理部に設けられた所定データバス幅の第1メモリと、
入力されたパケットを前記第1メモリに書き込み、パケットの先頭からデータを前記第1メモリより読み込み前記データバス幅単位に順次出力し、前記付加位置のデータが含まれる前記データバス幅単位のデータを前記データ付加長及び前記付加位置に基づいて繰り返して出力する前記第1パケットデータ処理部に設けられたメモリ制御部と、
前記データバス幅、前記付加位置及び前記付加データ長に基づき、前記第1メモリからデータバス幅単位に出力されるパケットの先頭データから付加位置までのデータについては、そのまま出力し、前記付加位置から付加データ長よりも後のデータについては、削除するべきデータ長だけ後のデータを選択して出力する前記第1パケットデータ処理部に設けられたリオーダ部と、
前記リオーダ部より出力されるパケットの付加位置にあるデータを付加データで上書きする前記第1パケットデータ処理部に設けられたライト部と、
前記メモリの空きが足りなくなったとき、前記第1パケットデータ処理部の前段側にパケットの出力の停止を指示し、前記メモリの空きが確保されたとき、前記第1パケットデータ処理部の前段側にパケットの出力を再開するよう指示する制御部と、
を具備したことを特徴とするパケットデータ処理装置。
【0082】
(付記6) 前記パケットデータ処理群の初段のパケットデータ処理部の前段にパケットデータを蓄積し、パケットの先頭から順次出力する第2メモリを更に設け、前記制御部は、前記第2メモリにパケットの出力の停止及び再開を指示することを特徴とする付記5記載のパケットデータ処理装置。
【0083】
【発明の効果】
以上説明した本発明によれば、必要なときにパケットデータにデータを付加する処理を行うパケットデータ処理部よりも前段のパケットデータ処理部に対してパケットの入力を制限する手法を取ることによっても、パケットの高速処理を損なうことなく、ヘッダの付加のようにパケットの全長が長くなる処理が可能である。
【図面の簡単な説明】
【図1】本発明の原理図である。
【図2】本発明の第1実施形態によるパケットデータ処理装置の構成図である。
【図3】図2中のパケットデータ処理プロセッサ群の構成図である。
【図4】図3中のパケットデータ処理プロセッサAの構成図である。
【図5】図3中のパケットデータ処理プロセッサBの構成図である。
【図6】データ付加の判断後のパケットデータ処理プロセッサAの状態を示す図である。
【図7】2クロック後のパケットデータ処理プロセッサAの状態を示す図である。
【図8】データ移動後のパケットデータ処理プロセッサAの状態を示す図である。
【図9】本発明の第2実施形態によるパケットデータ処理装置の構成図である。
【図10】図9中のパケットデータ処理プロセッサ群の構成図である。
【図11】図10中のパケットデータ処理プロセッサの構成図である。
【図12】図10中のデータ付加・削除機構部の構成図である。
【図13】図12中のリオーダ部の構成図である。
【図14】バス幅単位のデータ伸長動作を示す図である。
【図15】データ付加時のリオーダ部の動作を示す図である。
【図16】バス幅単位のデータ収縮動作を示す図である。
【図17】バス幅単位のデータ収縮動作を示す図である。
【図18】データ削除時のリオーダ部の動作を示す図である。
【図19】データ削除時のリオーダ部の動作を示す図である。
【図20】本発明の第3実施形態によるパケットデータ処理装置の構成図である。
【図21】図20中のパケットデータ処理プロセッサ群の構成図である。
【図22】従来のストアアンドフォワードによるパケット処理方式を示す図である。
【図23】パケットデータ処理プロセッサの構成図である。
【図24】パケットデータ処理プロセッサを複数個並べたハードウェア構成を示す図である。
【図25】2つのプライベートネットワーク間を共有ネットワークにより接続したネットワーク構成を示す図である。
【図26】データ付加削除前のパケットデータ処理プロセッサの状態を示す図である。
【図27】パケットが密接しているときのシフトレジスタの状態を示す図である。
【符号の説明】
50#i(i=1,2,…) パケットデータ処理部
50#A 第1パケットデータ処理部
52 パケットデータ処理群
54 データ付加部
56 制御部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a pipelined packet data processing apparatus that processes input packet data.
[0002]
[Prior art]
In performing packet communication between terminals, an IP (Internet Protocol) network is currently most commonly used. In this IP network, a network node that performs relaying between networks performs packet processing such as header rewriting processing in a packet and search and routing of a destination table provided in the device for the relay device. With the recent increase in the speed of the Internet, network nodes that perform packet relays attempt to speed up packet processing by performing packet processing with dedicated hardware. Conventionally, there is a method of performing store-and-forward processing when a packet processing unit of a network node that relays packets processes a packet.
[0003]
FIG. 22 is a diagram showing a conventional configuration of the store-and-forward method. In this configuration, the packet processing unit 2 configured by a general processor or dedicated hardware and the memory 4 are connected by the bus 6, and the packet processing unit 2 stores the necessary data of the packet stored in the memory 4. On the other hand, processing necessary for packet relay is performed. In the conventional store-and-forward packet processing, the packet processing unit 2 processes the packet stored in the memory 4 in accordance with a software instruction prepared in advance. For this reason, in this packet processing, it is possible to easily change the processing to be performed on the packet later by rewriting a software instruction prepared in advance. Therefore, the processing content can be changed later for the purpose of revision of the protocol and improvement of the service function provided as a network.
[0004]
However, in this process, since the packet data is stored in the memory 4, a read / write operation to the memory 4 storing the packet data is required. The packet processing unit 2 gives the address of the memory to be read to the memory 4 and then reads the data from the memory 4, or the packet processing unit 2 gives the address of the memory to be written by the packet processing unit 2 to the memory 4 and then the memory The process of writing data to 4 is performed. At this time, the time for the packet processing unit 2 to read and write data from the memory 4 after the processor gives an address to the memory 4 is considerably longer than the cycle time of the processor. For this reason, the overhead of read / write processing to the memory 4 becomes a problem, and packet processing cannot be performed at high speed.
[0005]
Therefore, in recent years, a method has been devised for executing packet processing at high speed with a dedicated hardware circuit. In the dedicated hardware circuit, packet processing can be performed with a high-speed hardware clock, so that packets can be processed at high speed. However, there is a problem that it is not possible to easily change the function for improving the function, and it is necessary to develop new hardware each time. By the way, when the network node processes the IP and lower layer protocols, the processing is performed based on information in each protocol header, and information in the data portion of the IP is rarely required. Hardware that performs high-speed processing can be considered by paying attention to the locality that the processing target is only each protocol header.
[0006]
FIG. 23 is a diagram illustrating a packet data processing processor that focuses on locality of processing. The packet data processor 10 includes a general-purpose register 12, an arithmetic unit 14, and shift registers 16 and 18. The packet data processor 10 is a pipeline composed of shift registers 16 and 18 for shifting packet data and information synchronized with the packet such as the result of an operation to be temporarily stored to the next stage for each clock. To store. In the packet data processor 10, processing to be performed on the packet is described in advance by software. The packet data processor 10 is activated when the head of a packet is input, and performs processing according to a description of software prepared in advance. The data in the registers 16 and 18 constituting each pipeline is shifted by the clock, and the packet data processing processor 10 performs processing for the determined number of clocks. When the next packet is input after the processing is completed, the processing is similarly performed on the packet.
[0007]
FIG. 24 is a diagram illustrating a hardware configuration in which a plurality of packet processors are arranged. As shown in FIG. 24, in this hardware configuration, a plurality of packet processors 30 # i (i = 1 to n) are arranged. Each packet data processor arranged as shown in FIG. 24 performs each process and completes the packet processing required by the network node as a whole. Processing a packet in such a processing system means that if the packet processing has locality, such as the processing only reaches the IP layer, it can be processed at high speed by a pipelined register, and the software can be changed. Processing can be changed flexibly.
[0008]
[Problems to be solved by the invention]
On the other hand, there is an increasing need for multi-functional processing at network nodes, and some of such processing requires adding new headers to the packets and deleting unnecessary headers. is there. There is a tunneling process that requires such a process. The tunneling process is used when, for example, communication between two private networks is used via a shared network such as the Internet.
[0009]
FIG. 25 is a network configuration diagram in which two private networks are connected by a shared network. In FIG. 25, consider a case where communication is performed from the private network 40 # A to the private network 40 # B. A packet transmitted from the private network 40 # A is added with a header for the shared network 42 by the network node 44 # A connecting the private network 40 # A and the shared network 42 (capsule processing), and is sent to the shared network 42 such as the Internet. Sent. Then, when the network node 44 # B connecting the other private network 40 # B receiving the packet and the shared network 42 receives the packet sent from the private network 40 # A, it is added at the time of the capsule processing. The header is deleted (decapsulation processing), the packet is returned to the state before being encapsulated, and the packet is transmitted to another private network 40 # B. Therefore, in the network nodes 44 # A and 44 # B that need to perform the capsule process / decapsulation process, it is necessary to perform the header addition / deletion operation as described above.
[0010]
In the packet data processing method in which processing is performed by paying attention to the locality of packet processing, processing is performed by register access, so that packet processing can be performed at high speed. Since addition / deletion of the header is also performed by paying attention to the header, the processing can be performed at high speed by using this processing method.
[0011]
FIG. 26 is a diagram illustrating a state of the packet data processor before data addition / deletion. For example, consider a case where a packet is stored in the shift register 18 in the state shown in the figure. A hatched portion in FIG. 26 indicates a packet, and a packet header is stored in P2. At this time, in order to delete the data in P0, the data in P2 and P1 may be overwritten in P1 and P0, respectively. When it is desired to add data between P0 and P1, the data in P1 and P2 can be overwritten in P2 and P3, respectively, and the data to be added in P1 can be written. However, in the data addition processing, there is a problem because the total length of the packet after processing is longer than the packet before processing.
[0012]
FIG. 27 is a diagram illustrating the state of the shift register when packets are in close contact. In this packet data processing method, when packets are input continuously, the packets are input one after another as shown in FIG. If a packet is added in this state, data is written on the packet processed before the packet, and the data of the previously processed packet is destroyed. For example, when data of a previously processed packet is stored in P3, data in P2 is destroyed by data of a later packet. In order to avoid this, if the packet is input to the packet data processing group, if the control is performed so as to leave a certain interval between the packets, data will not be overwritten in the previously processed packet, Data can be added. However, if a certain interval is provided between all packets, an interval is also provided for packets that do not require data addition, and the throughput of the processing may be reduced.
[0013]
As described above, processing that shortens the total length of a packet, such as deleting a packet, can be handled without any problem by a conventional packet data processor. However, if a conventional packet data processing processor performs a process in which the total length of the packet is longer than the original total length, such as adding a packet, there is a problem that the processing efficiency decreases.
[0014]
The present invention has been made in view of the above, and an object of the present invention is to provide a packet data processing apparatus capable of adding packet data without lowering the processing efficiency.
[0015]
[Means for Solving the Problems]
FIG. 1 shows the principle of the present invention. As shown in FIG. 1, the bucket data processing apparatus processes a packet input to each of the packet data processing units 50 # i (i = 1, 2) configured in a pipeline configuration that outputs to the subsequent stage. ,...). The first packet data processing unit 50 # A in the packet data processing group 52 includes a data adding unit 54 that adds data to the input packet. While the data adding unit 54 is performing the data adding process, the packet data processing device instructs the preceding stage of the first packet data processing unit 50 # A to stop outputting the packet, and the data adding unit 54 performs the data adding process. After the completion, the control unit 56 is further provided in front of the first packet data processing unit 50 # A for instructing to resume the output of the packet.
[0016]
When a packet is input to the packet data processing device, each packet data processing unit 50 # i (i = 1, 2,...) Performs a predetermined process on the packet. The control unit 56 provided separately from the packet data processing group 52 or the packet data processing group 52, when it is necessary to add data to the packet, sets at least the data addition length between the data addition target packet and the previous packet. In order to secure a sufficient amount, the packet data processing unit 50 # i (i = 1, 2,..., B) preceding the first packet data processing unit 50 # A is instructed to stop outputting packet data. The data adding unit 54 adds data to the packet when the data adding length is secured. As described above, when the packet data processing group 52 processes a packet by pipeline processing and needs to add data to the packet, it simply stops output to the subsequent stage of the packet data. Packet data can be added without reducing efficiency.
[0017]
DETAILED DESCRIPTION OF THE INVENTION
First embodiment
FIG. 2 is a block diagram of the packet data processing apparatus according to the first embodiment of the present invention. The packet data processing apparatus shown in FIG. 2 includes, for example, network nodes 44 # A and 44 # that connect the private networks 40 # A and 40 # B of the network shown in FIG. 25 and the shared network 42 such as the Internet. This is applied to B. As shown in FIG. 2, the packet data processing device 60 includes a plurality of reception interface cards 62 # i (i = 1 to n), a switch fabric 64, and a plurality of transmission interface cards 66 # i (i = 1 to n). Have. The reception interface card 62 # i (i = 1 to n) has the following functions. (1) The packet is received from the corresponding private network, for example, a LAN or a shared network. {Circle around (2)} It is determined whether or not the received packet needs to be encapsulated / decapsulated from the packet header. (3) Capsule processing / decapsulation processing is performed when it is necessary to perform capsule processing / decapsulation processing. Note that data addition processing is performed in the capsule processing, and data deletion processing is performed in the decapsulation processing. (4) The packet subjected to the capsule processing or the like is output to the switch fabric 64.
[0018]
The reception interface card 62 # i includes a reception interface unit 70 # i, a pre-processing unit 72 # i, and a packet data processing processor group 74 # i. The reception interface unit 70 # i receives a packet according to the physical interface. The pre-processing unit 72 # i performs preprocessing such as detection of a packet header for the packet processor group 74 # i to add / delete data to / from the packet. The packet processing processor group 74 # i is configured such that a plurality of packet data processing processors are pipelined to perform processing on packets, and have the following functions, for example. (1) It is determined from the packet header whether or not it is necessary to add / delete data to / from the packet. (2) When it is determined that data needs to be added to the packet, the data to be added, the data length, and the position to be added on the packet are obtained. (3) When it is determined that it is necessary to delete data from the packet, the data length to be deleted and the position to be deleted on the packet are obtained. Data is added / deleted based on the data length obtained in (4), (2) and (3). (5) When adding data, in order to secure at least the additional data length interval between the addition target packet and the previous packet, the packet processing processor in the previous stage of the packet data processing processor that performs the data addition processing stops outputting the packet data. And the operation of the active packet data processor is stopped. {Circle around (6)} When an interval corresponding to the length of the previous packet and the additional data is secured, the previous packet processing processor resumes outputting the packet data and resumes the operation of the packet data processor that has stopped the operation. (7) The packet length after the change by adding / deleting data is set in the packet header.
[0019]
FIG. 3 is a configuration diagram of the packet data processor group 74 # i in FIG. As shown in FIG. 3, the packet processor group 74 # i includes a bus 88 that transfers intermediate data other than packets, a bus 89 that transfers packets, and a plurality of packet data processors that are pipeline-connected by the buses 88 and 89. 90 # i (i = 1 to n) and a back pressure signal line 92. Buses 88 and 89 are data buses for transferring intermediate data and packets. The packet data processor 90 # i (i = 1 to n) holds intermediate data and packet data input from the buses 88 and 89 in its own shift register and performs predetermined processing on the packet. . The number of stages is arbitrarily set according to the contents of the entire packet processing.
[0020]
The packet data processor 90 # A adds / deletes data in accordance with instructions from the preceding packet data processor group. Specifically, the following processing is performed. {Circle around (1)} Whether or not it is necessary to add / delete data to a packet is determined according to the instruction from the packet data processor group in the previous stage. {Circle around (2)} When data needs to be added to a packet, the additional data position and additional data are specified based on an instruction from the preceding packet processor group, and the data is added. {Circle around (3)} Based on the additional data length, the back pressure signal line 92 is asserted for a time corresponding to the number of clocks corresponding to the additional data length, and the operation of the packet data processing processor group preceding the packet data processing processor is stopped. . (4) When data deletion is necessary, the deletion data position and the deletion data length are specified based on the instruction of the packet processor group in the previous stage, and the data deletion processing is performed. Note that the operation stop / restart control for the packet data processor 90 # i (i = 1, 2, B,...) Preceding the packet data processor 90 # A of (3) and (4) is controlled by the packet data processor. You may make it carry out by the control part independent of the group. Further, during the period in which the back pressure signal line 92 is asserted and the operation of the packet data processor group is stopped, the preceding stage (the preceding stage processing unit 72 # i in the configuration of FIG. 2) temporarily transfers data according to the back pressure. Stop.
[0021]
FIG. 4 is a block diagram of the packet data processor 90 # A in FIG. As shown in FIG. 4, the packet data processor 90 # A includes a general-purpose register 93 # A, an arithmetic unit 94 # A, an intermediate data register 96 # A, and a packet access register 98 # A. The general purpose register 93 # A is, for example, eight 32-bit length registers r0 to r7. The arithmetic unit 94 # A is a processor that performs an operation in accordance with an instruction code described in a program. When data is added, the back pressure signal line 92 is asserted for a period corresponding to the additional data length. The intermediate data register 96 # A is, for example, 16 stages of 32-bit shift register registers e0 to e15 for holding and transmitting a processing result related to the packet data in synchronization with the packet data. The data held in the intermediate data register 96 # A includes, for example, data indicating the beginning of the packet, flag bits indicating whether data needs to be added / deleted, additional data, additional data position, additional data length, deleted data It is the position and deleted data length. The packet access register 98 # A is, for example, 16 stages of 32-bit shift register registers p0 to p15 for directly capturing packet data.
[0022]
The packet data processor 90 # B preceding the packet data processor 90 # A performs the following processing. (1) It is determined from the packet header whether it is necessary to perform processing for adding / deleting data to / from the packet. (2) When it is determined that data needs to be added to the packet, the data to be added, the data length, and the position to be added on the packet are obtained. (3) When it is determined that data is to be deleted from the packet, the data length to be deleted and the position to be deleted on the packet are obtained. (4) The intermediate data obtained by (1) to (3) is output on the data bus. (5) When the back pressure signal line 92 is asserted, the shifting operation of the packet data and the intermediate data is stopped and the processing is stopped if the packet processing is in progress. {Circle around (6)} When the back pressure signal line 92 is negated, the shifting operation of the packet data and the intermediate data is resumed and the suspended processing is resumed.
[0023]
FIG. 5 is a block diagram of the packet data processor 90 # B in FIG. When the back pressure signal line 92 is asserted, the packet data processor 90 # B, for example, stops the system clock based on the back pressure signal, whereby the arithmetic unit 94 # B, the intermediate data register 96 # B, The operation of the packet access register 98 # B is stopped. The general-purpose register 93 # B, the arithmetic unit 94 # B, the intermediate data register 96 # B, and the packet access register 98 # B are substantially the same as those in FIG. The configuration of the packet processor 90 # i (i = 1, 2,...) Upstream of the packet data processor 90 # A is substantially the same as that of the packet data processor 90 # B. The configuration of the packet processor 90 # C subsequent to the packet data processor 90 # A is substantially the same as that of the packet data processor 90 # B except that the operation does not need to be stopped according to the back pressure signal line 92. For example, when data addition / deletion is performed according to the intermediate data, the packet length information in the packet header is updated.
[0024]
The switch fabric 64 in FIG. 2 inputs a packet from the receiving interface card 62 # i (i = 1 to n), and refers to the routing table according to the IP address or MAC address set in the packet header. Routing to the corresponding transmission interface card 66 # k (k = 1 to n). However, the routing table reference processing may be performed by the packet processing processor group 74 # i, and the switch fabric 64 may be routed to the transmission interface card 66 # k (k = 1 to n) determined according to the processing result. The transmission interface card 66 # i has a transmission interface unit 80 # i. The transmission interface unit 80 # i inputs a packet from the switch fabric 64 and transmits the packet according to the physical interface of the transmission path. Hereinafter, the operation of the packet data processing device 50 of FIG. 2 will be described.
[0025]
(1) Operation of reception interface card 62 # i
The reception interface unit 70 # i in each reception interface card 62 # i receives the packet data from the transmission path according to a predetermined physical interface, and outputs the packet data to the upstream processing unit 72 # i. The pre-stage processing unit 72 # i performs serial / parallel conversion on the 32-bit parallel data of the packet data, and outputs it to the data bus connected to the packet access register 96 # 1. The packet header is detected and a flag indicating the header is output to the data bus connected to the intermediate data register 96 # 1 in synchronization with the packet. Each packet data processor 90 # j (j = 1, 2,...) In the packet data processor group 74 # i stores the packet in the intermediate data register 96 # j when the packet is stored in the packet access register 98 # j. Each process is performed on the packet in accordance with the stored intermediate data. Further, the data output is stopped during the period when the back pressure signal is notified from the packet processing processor group 74 # i by the back pressure signal.
[0026]
(A) Determination of data addition / deletion
The packet data processor 90 # B determines from the packet header whether or not to add / delete data to / from the packet. If it is determined that data is to be added to the packet, the data to be added, the data length, and the position to be added on the packet are obtained. When it is determined that data is deleted from the packet, the data length to be deleted and the position to be deleted on the packet are obtained. Flag bit indicating whether to perform addition / deletion. When adding data, data to be added, data length to be added, position of the data to be added on the packet, data length to be deleted, data to be deleted The position of the data on the packet is written in the intermediate data register 96 # B in synchronization with the packet. The packet data and the intermediate data are transferred by the packet access register, the intermediate data register, and the data bus in the packet processing processor group 74 # i in synchronization with the clock.
[0027]
(B) Operation of packet data processor 90 # A
The packet data processor 90 # A is activated when a packet is input to the packet access register 98 # A. When a packet is input to the packet access register 98 # A, whether or not data needs to be added to or deleted from the packet data processor in the previous stage input to the intermediate data register 96 # A in synchronization with the packet Is determined by the flag bit. When addition is required from the flag bit, the data to be added, the additional data length, and the addition position on the packet are obtained from the intermediate data register 96 # A. If deletion is necessary, the deletion data length and the deletion position on the packet are obtained from the intermediate data register 96 # A. Here, it is assumed that an instruction is given to add 64-bit data to the 32nd bit from the beginning of the packet.
[0028]
(B-1) Data addition
FIG. 6 is a diagram illustrating the packet data processor 90 # A after determination of data addition. Assume that the head data of a packet to which data is to be added is stored in the register P3 of the packet access register 98 # A. Further, it is assumed that the final data of the previous packet of this packet is stored in the register P4. The packet data processor 90 # A asserts the back pressure signal line 92 for a clock time corresponding to the additional data length so as not to shift the packet access register with respect to the packet data processor upstream of itself. The shift operation of the register of the packet access register 98 # A storing the data addition target packet is stopped. A shift operation is performed on the register of the packet access register 98 # A in which the previous packet of the data addition target packet is stored. Here, since the head of the data addition target packet is stored in the register P3 of the packet access register 98 # A, the shift operation of the registers P3-P0 is stopped. On the other hand, the shift operation of the registers P4 to P15 continues.
[0029]
On the other hand, when the back pressure signal line 92 is asserted, the packet data processor 90 # i (i = 1, 2, B,...) Prior to the packet data processor 90 # A In order to stop the operation of the intermediate data register, for example, the system clock is negated. Here, since the size of the additional data is 64 bits and the packet access register 98 # A is 32 bits, the data transfer of the data addition target packet and the subsequent packet data is stopped for 64 ÷ 32 = 2 clocks. However, the packet data before that must continue to be transferred. Therefore, the transfer of the packet data after the register P3 is stopped for two clocks, and the transfer of the packet data before the data of the register P4 is continuously performed.
[0030]
FIG. 7 shows the packet data processor 90 # A after two clocks. As shown in FIG. 7, after 2 clocks, a space is secured in the registers P4 and P3 of the 32nd bit from the beginning of the packet, which is the position where data is to be added. The packet data processor 90 # A, which has determined that it must be stopped for two clocks, can resume the shift of the packet after two clocks have elapsed. The pressure signal line 92 is negated to instruct the packet data processor prior to the packet data processor 90 # A to resume the shift. When the back pressure signal line 92 is negated, the packet data processing processor preceding the packet data processing processor 90 # A resumes the shift operation. The packet data processor that has suspended the instruction resumes the suspended instruction. The packet data processor 90 # A moves by the additional data length from the packet head data stored in the packet access register 98 # A to the data immediately before the position where the data is to be added. Thereafter, the data to be added stored in the intermediate data register 96 # A is stored in the register at the position to be added in the packet access register 98 # A. Then, the data in the intermediate data register 96 # A synchronized with the packet is moved as necessary.
[0031]
FIG. 8 is a diagram illustrating the state of the packet data processor 90 # A after data movement. Here, since it is added to the 32nd bit from the beginning of the packet, the data in the register P3 storing the 32bit data before the 32nd bit is moved by 64 bits. That is, the data hand of the register P3 is moved to the register P5. Thereafter, the additional data stored in the intermediate data register 96 # A is added to the 64-bit vacant place, the registers P3 and P4. The added packet is transferred to the subsequent packet data processor group by the shift operation of the packet access register 98 # A.
[0032]
(B-2) Data deletion
When deletion is necessary from the flag bit, the deletion data length and the deletion position on the packet are obtained from the intermediate data register 96 # A. For the packet to be deleted, the data before the deletion position stored in the packet access register 98 # A is moved behind the deletion data length. For example, when the deletion position on the packet is the 32nd bit from the beginning of the packet, the deletion data length is 64 bits, and the beginning of the packet is stored in the register P3, the 32-bit data stored in the register P3 is moved by 64 bits. That is, it moves to the register P1. At this time, the data in the intermediate data register 96 # A synchronized with the packet is moved as necessary. The deleted packet is transferred to the subsequent packet data processor group by the shift operation of the packet access register 98 # A.
[0033]
(C) Operation of packet data processor group in the subsequent stage of packet data processor 90 # A
The subsequent packet data processor group receives the packet data and intermediate data from the buses 88 and 89, and updates the packet header length when the packet processing, for example, the packet data processor 90 # A adds or deletes the data. Processing is performed, and a packet is output to the switch fabric 64 from the packet data processor 90 # C at the final stage.
[0034]
(2) Operation of switch fabric 64
The switch fabric 64 inputs a packet from the reception interface card 62 # i (i = 1 to n), refers to the routing table according to the IP address or MAC address set in the packet header, and corresponds to the transmission interface. Route to card 66 # k (k = 1 to n). However, the routing table reference processing may be performed for the packet processing processor group 74 # i, and the switch fabric 64 may be routed to the transmission interface card 66 # k (k = 1 to n) determined according to the processing result.
[0035]
(3) Operation of transmission interface card 66 # i
The transmission interface card 66 # i receives a packet from the switch fabric 64 and transmits the packet according to the physical interface of the transmission path.
[0036]
As described above, the packet data processor group determines whether it is necessary to add / delete data to the packet, and generates data necessary for addition / deletion. The packet data processor A receives such data, determines whether it is necessary to leave a packet interval by adding data, and if necessary, has the packet data processor group in the previous stage restrict the input of packets. As a result, it is possible to perform the data addition process without leaving a packet interval determined based on the size of the data to be added and reducing the packet processing throughput.
[0037]
Second embodiment
FIG. 9 is a block diagram of a packet data processing apparatus according to the second embodiment of the present invention. Components that are substantially the same as those in FIG. 2 are given the same reference numerals. In the packet data processing apparatus 100 shown in FIG. 9, the packet data processing processor group 104 # i in the reception interface card 104 # i is different from the packet data processing processor group 74 # i in FIG. The packet data processor group 104 # i can add / delete data even when the addition / deletion data length is not a multiple of the bit width of the packet access register of the packet data processor, and packet data to which data is added A buffer memory that holds packet data and intermediate data is provided in the processing processor, so that the shift operation is not stopped when data is added, but only when the buffer becomes insufficient due to data addition. Is different from the packet data processor group 74 # i in FIG.
[0038]
FIG. 10 is a block diagram of the packet data processor group 104 # i in FIG. 9, and components that are substantially the same as those in FIG. 3 are given the same reference numerals. In the buses 108 and 109 and the packet data processor 110 # i, the bit widths of the buses 108 and 109, the packet access register, and the intermediate data register are shown in FIG. In this example, the buses 88 and 89 and the packet data processor 90 # i are changed.
[0039]
FIG. 11 is a block diagram of the packet data processor 110 # i in FIG. 10, and components that are substantially the same as those in FIG. 5 are given the same reference numerals. The intermediate data register 120 # i is, for example, a four-stage 64-bit shift register register e0 to e3 for holding and transmitting a processing result related to the packet data in synchronization with the packet data. The packet access register 122 # i is, for example, four stages of 128-bit shift register registers p0 to p3 for directly capturing packet data. The data addition / deletion mechanism 112 adds / deletes data in the same manner as the packet data processor 90 # A in FIG. The data addition / deletion mechanism unit 112 is configured by dedicated hardware, for example.
[0040]
FIG. 12 is a configuration diagram of the data addition / deletion mechanism unit 112 in FIG. As shown in FIG. 12, the data addition / deletion mechanism unit 112 includes a data length check unit 120, an expansion / contraction buffer 122, a reorder unit 124, a write data extraction unit 126, and a data write unit 128. The data length check unit 120 obtains the total length of the data after data addition / deletion from the packet data and the intermediate data, and checks whether the maximum allowable packet length is exceeded. If it exceeds, an error is output.
[0041]
The expansion / contraction buffer 122 includes a packet data memory and intermediate data memory that store packet data and intermediate data, and a controller that controls these memories. Each memory is a FIFO (First In First Out) buffer. The packet data memory is a FIFO composed of a memory area having the same data bit width as that of the packet access register 122 # i, for example, 128 bits. The intermediate data buffer is a FIFO having the same data bit width as that of the intermediate data register 120 # i, for example, a 64-bit width.
[0042]
The controller has the following functions. (1) The flag bit is read from the intermediate data buffer to check whether it is necessary to add or delete data. (2) When it is necessary to delete data, delete data in units of bus width. When deletion is possible in units of bus width, deletion is performed in units of bus width. Data deletion can also be performed by moving the data on the packet data memory. However, from the viewpoint of speeding up the packet processing, the data to be deleted can be deleted in parallel with the process of writing the packet data to the packet data memory. It is desirable to achieve this by skipping data reading and reading data not subject to deletion. However, since data deletion is performed in units of bus width, when the data deletion length is not an integral multiple of the bus width of the bus 109, the data deletion position is the first on the bus 109 even if the data deletion length is an integer multiple of the bus width. Otherwise, data that cannot be deleted remains, but this data is deleted by the reorder unit 124. (3) When it is necessary to add data, (i) it is determined whether the packet data memory is sufficient from the size of the additional data in the intermediate data and the free capacity of the packet data memory. The back pressure signal line 92 is asserted for a clock time corresponding to an insufficient memory capacity. This is because, in the data addition processing, the same data is copied in units of the data bus width, and there is a possibility that the packet data memory will be insufficient. (ii) Data expansion is performed in units of bus width. Data decompression refers to securing an area to which data is added. Data decompression is performed multiple times in units of bus width (additional data size divided by data) at the additional position on the packet in parallel with the packet data memory write processing from the viewpoint of speeding up the packet processing. This is realized by reading the bus width (rounded up if there is a remainder). However, since data expansion is performed in units of bus width, when the data addition length is not an integral multiple of the bus width, and when the data addition position is not the head of the bus 109, an extra data area is secured beyond the data addition length. However, the reorder unit 124 deletes excess data.
[0043]
The reorder unit 124 has the following functions. (1) When data addition / deletion is not performed, the data read from the addition / deletion buffer 122 is output to the data write unit 128 as it is. (2) When adding / deleting data, data that has not been deleted by data deletion and extra data by data addition are deleted.
[0044]
FIG. 13 is a configuration diagram of the reorder unit 124 in FIG. The reorder unit 124 includes three stages of 128-bit shift registers 130 # 0, 130 # 1, and 130 # 2, a reorder control sequencer 132, and a selector 134 # i (i = 0 to 7). The shift register 130 # i is a register that shifts 128-bit packet data output from the buffer 122, and includes, for example, eight 16-bit registers 131 # ij (j = 0 to 7). The reason why the register 131 # ij is 16 bits is because the data unit for data addition / deletion is 16 bits here. The reason why the shift register 130 # i (i = 0 to 2) has three stages is that when 128-bit packet data is divided into 16 bits, it is expanded and contracted in units of 128 bits (k = 0 to 7). This is because the data overwritten on the 16th bit data is the 16th bit data after 14 at the maximum.
[0045]
The reorder control sequencer 132 has the following functions. (1) It is determined whether or not data addition / deletion is necessary from the flag bit of the intermediate data. (2) When there is no need to add / delete data, a selection signal = 0 is output to the selector 134 # i (i = 0 to 7) so as to select the 16-bit output of the register 131 # 0i. {Circle around (3)} When data needs to be added / deleted, (i) selector 134 # i (i = i = until the data required to delete unnecessary bits is output to the last shift register 130 # 0. The selection signal = 0 is output to 0-7). (ii) In a clock in which data that needs to delete unnecessary bits is output to the shift register 130 # 0 at the final stage, a selection signal = 0 is set to the selector 134 # i at the data position before the data to be deleted. Output. The data to be deleted means data to be deleted when data deletion is instructed and extra data by data decompression. When data is not deleted / added, the output data of the shift register 130 # 0i corresponds to the selector 134 # i. (iii) For the data after the deletion position, a selection signal is output to instruct the selection of data behind the deletion amount. For example, when 16 × k bits are deleted, the selection signal = k.
[0046]
The selector 134 # i receives the 16 × 15-bit output signal of the output signal of the shift register 131 # 0i and up to 14 shift registers, and the shift register 131 # when the selection signal = 0. When the output signal of 0i is selected and the selection signal = k (k ≠ 0), the signal output from the k-th subsequent register is selected. For example, the selector 134 # 0 receives the output signals of the register 131 # 0j (j = 0 to 7) and the register 131 # 1j (j = 0 to 6), and when 0 ≦ k ≦ 7, the register 131 # The output signal of 0k is selected, and when 8 ≦ k ≦ 14, the output signal of the shift register 131 # 1 (k−8) is selected.
[0047]
The write data extraction unit 126 in FIG. 12 determines whether or not data addition is necessary based on the flag bit. If data addition is necessary, the additional data is extracted from the intermediate buffer memory, and the data The data is output to the write unit 128. When data needs to be added, the data write unit 128 overwrites with the corresponding additional data when data requiring data addition is output from the reorder unit 124 in units of 128 bits. Hereinafter, the operation of the packet data processing apparatus 100 of FIG. 9 will be described.
[0048]
(1) Operation of receiving interface card 102 # i
The reception interface unit 70 # i and the pre-processing unit 72 # i in each reception interface card 102 # i operate in the same manner as in the first embodiment.
[0049]
(A) Determination of data addition / deletion
The packet data processors 110 # 1,..., 110 # B before the data addition / deletion mechanism unit 112 are packet processors 90 # 1,..., 110 before the packet data processor 90 # A in FIG. Processing similar to 90 # B is performed. Similar to the packet data processor 90 # B, the packet data processor 110 # B determines whether or not to perform processing for adding / deleting data to / from the packet based on the header of the packet. The related intermediate data is written to the intermediate data register 120 # B.
[0050]
(B) Operation of data addition / deletion mechanism unit 112
The data length check unit 120 obtains the total length of the data after data addition / deletion from the packet header and intermediate data, and checks whether the maximum length of the packet is exceeded. An error is output when the maximum packet length is exceeded. The decompression / deletion buffer 122 writes the packet data to the packet data memory and the intermediate data to the intermediate data memory. It is determined from the flag bit of the intermediate data whether it is necessary to add / delete data.
[0051]
(B-1) When there is no need to add or delete data
The expansion / contraction buffer 122 reads the packet data from the packet data memory and outputs it to the reorder unit 124. The shift register 130 # i (i = 2, 1, 0) in the reorder unit 124 shifts the packet data. The reorder control sequencer 132 outputs a selection signal = 0 to the selector 134 # i (i = 0 to 7). The selector 134 # i selects the data output from the shift register 131 # 0i and outputs it to the data write unit 128. The data write unit 128 outputs data output from the reorder unit 124.
[0052]
(B-2) When data needs to be added
The expansion / contraction buffer 122 determines whether the packet data memory is sufficient from the size of the additional data in the intermediate data and the free capacity of the packet memory. If the packet data memory is insufficient, the expansion / contraction buffer 122 sets the back pressure signal line 92 for the insufficient clock time. Assert. When the back pressure signal line 92 is asserted, the packet data processor group preceding the data addition / deletion mechanism unit 112 stops the shift operation and interrupts the instruction at the instruction position being executed. The expansion / contraction buffer 122 reads from the data memory up to data in units of bus width including the designated start position of the additional data. The data in the bus width unit including the additional data designation start position is copied the size of the additional data divided by the bus width (rounded up if there is a remainder) times.
[0053]
FIG. 14 is a diagram showing the decompression operation when the bus width is 128 bits, the size of the additional data is 64 bits, and the designated start position is 32 bits. In particular, FIG. 14 (a) shows the state before data decompression. FIG. 8B is a diagram showing a state after data expansion. As shown in FIG. 14A, when the data addition position is the 32nd bit, the expansion / contraction buffer 122 copies the 128-bit data included in the data addition position 64 ÷ 128 = 1 (rounding up the remainder) times. At this time, since 64 = (128−64) bits of extra data has been copied, this extra data is deleted from the reorder unit 124 as will be described later.
[0054]
The packet that has been expanded / contracted by the expansion / contraction buffer 122 is input to the reorder unit 124. The shift register 130 # i (i = 2, 1, 0) in the reorder unit 124 shifts the input packet data in synchronization with the clock. The reorder control sequencer 132 follows the designated start position indicated by the intermediate data until the data necessary to delete unnecessary bits is output to the shift register 130 # 0 at the final stage until the selector 134 # i (i = The selection signal = 0 is output to 0-7). In a clock in which data necessary to delete unnecessary bits is output to the last-stage shift register 130 # 0, the selection signal = 0 is output to the selector 134 # i at the data position before the deletion target data. For the back data including the data at the designated start position, a selection signal is output to instruct to select the back data by the deletion amount. Deletion bit number = (decompressed bit number−data addition bit number).
[0055]
FIG. 15 is a diagram showing the operation of the reorder unit 124 when data is added. In particular, FIG. 15A shows the input of the reorder unit 124 and FIG. 15B shows the output of the reorder unit 124. FIG. 15 shows the operation when the bus width is 128 bits, the size of the additional data is 64 bits, and the designated start position is 32 bits. Data length to be deleted = 128− (remainder of 64 ÷ 128) = 64 bits. Therefore, the deletion amount = 64 ÷ 16 = 4 words. The reorder unit 124 passes through the input data up to the data addition position data. Subsequent data including data at the data addition position selects and passes the data four words behind.
[0056]
The write data extraction unit 126 reads the additional data from the intermediate data and outputs it to the data write unit 128. The data write unit 128 overwrites the data from the data addition position with the additional data extracted from the intermediate data by the write data extraction unit 126.
[0057]
(B-3) When data needs to be deleted
The expansion / contraction buffer 122 contracts data in units of bus width. That is, first, data from the top data of a packet to data in a bus width unit including data at the deletion data start position is read from the bucket data memory. Next, the data in the bus width unit including the data at the deletion data final position is read from the packet data memory, and the data in the bus width unit before the data at the deletion data final position is read from the data in the bus width unit next to the data at the deletion data start position. By skipping the data, the data is contracted in units of bus width.
[0058]
FIG. 16 is a diagram showing data contraction in units of bus widths. In particular, FIG. 16A shows a state before data contraction, and FIG. 16B shows a state after data contraction. . The In FIG. 16, the bus width is 128 bits, the size of the deleted data is 160 bits, and the designated start position is 112 bits. When this packet data is shrunk in units of bus width, as shown in FIG. 16B, 128-bit data is deleted from the 128th bit.
[0059]
FIG. 17 is a diagram showing another case of data contraction in units of bus widths. In particular, FIG. 17A shows a state before data contraction, and FIG. 17B shows a state after data contraction. FIG. In FIG. 17, the bus width is 128 bits, the deleted data size is 160 bits, and the designated start position is 64 bits. As shown in FIG. 17A, even when the size of the deleted data exceeds 128 bits, the data may not be shrunk in units of bus width.
[0060]
The packet reduced in the bus width unit by the expansion / contraction buffer 122 is input to the reorder unit 124. The shift register 130 # i (i = 2, 1, 0) in the reorder unit 124 shifts the input packet data in synchronization with the clock. The reorder control sequencer 132 keeps the selector 134 # i (i = 0 to 7) until the data necessary to delete unnecessary bits is output to the final shift register 130 # 0 according to the designated start position. Select signal = 0 is output. In a clock in which data necessary to delete unnecessary bits is output to the last-stage shift register 130 # 0, the selection signal = 0 is output to the selector 134 # i at the data position before the deletion target data. For the back data including the data at the designated start position, a selection signal is output to instruct to select the back data by the deletion amount. Deleted bit amount = deleted data bit length−shrinkage bit length.
[0061]
FIG. 18 is a diagram showing the operation of the reorder unit 124 when deleting data. In particular, FIG. 18A shows the input of the reorder unit 124 and FIG. 18B shows the output of the reorder unit 124. FIG. 17 shows the operation when the bus width is 128 bits, the deleted data size is 160 bits, and the designated start position is 112 bits. The data length to be deleted is data of 160 ÷ 128 remainder = 32 bits from the designated start position. As shown in FIG. 17B, the data before the data deletion position is passed through the data output from the expansion / contraction buffer 122 data. For the following data including the data at the data deletion position, the data after 32 bits = 2 words (32 ÷ 16 = 2) is selected and passed.
[0062]
FIG. 19 is another diagram showing the operation of the reorder unit 124 in other cases when data is deleted. In particular, FIG. 19A shows the input of the reorder unit 124, and FIG. 19B shows the output of the reorder unit 124. Show. FIG. 19 shows the operation when the bus width is 128 bits, the size of the deleted data is 160 bits, and the designated start position is 64 bits. The data to be deleted is 160 + 128 remainder + 128 = 160 bits data from the designated start position. As shown in FIG. 19B, the data before the data deletion position is passed through the data output from the expansion / contraction buffer 122 data. For the subsequent data including the data at the data deletion position, the data after 160 bits = 10 words (160 ÷ 16 = 10) is selected and passed. The data write unit 128 passes through the deleted packet data.
[0063]
(C) Operation of subsequent packet data processing processor group
The packet data processor group 110 # C at the subsequent stage of the data adding / deleting mechanism unit 112 performs the same processing as the packet data processor 90 # C according to the first embodiment, and the packet data processor 110 # at the final stage. The packet is output from n to the switch fabric 64.
[0064]
(2) Operation of switch fabric 64
The switch fabric 64 inputs a packet from the reception interface card 62 # i (i = 1 to n), refers to the routing table according to the IP address or MAC address set in the packet header, and corresponds to the transmission interface. Route to card 66 # k (k = 1 to n). However, the routing table reference processing may be performed by the packet processor group 104 # i, and the switch fabric 64 may be routed to the transmission interface card 66 # k (k = 1 to n) determined according to the processing result.
[0065]
(3) Operation of transmission interface card 66 # i
The transmission interface card 66 # i receives a packet from the switch fabric 64 and transmits the packet according to the physical interface of the transmission path.
[0066]
As described above, as a special packet data processor, the packet data processor allows the data addition / deletion mechanism with a buffer function to perform data addition / deletion so that the data without worrying about the bus width can be obtained. Addition and deletion can be performed. Also, instead of stopping the data shift of the packet data processor group every time data is added, the data shift is stopped for the first time when there is no more free space in the buffer. Can be reduced.
[0067]
Third embodiment
FIG. 20 is a block diagram of a packet data processing apparatus according to the third embodiment of the present invention. Components that are substantially the same as those in FIG. 9 are given the same reference numerals. 20 is different from the packet data processor group 104 # i in FIG. 9 in the packet data processor group 144 # i in the reception interface card 142 # i. The packet data processor group 144 # i is provided with a buffer for storing packet data and intermediate data at the first stage, the back pressure signal is input only to the packet data processor at the first stage, and data addition / deletion The packet data processing processor group 104 in FIG. 9 continues the packet data processing group without stopping even when the data addition / deletion mechanism unit performs the data addition processing. Different from #i.
[0068]
FIG. 21 is a configuration diagram of the packet data processor group 144 # i in FIG. 20, and components that are substantially the same as those in FIG. 10 are given the same reference numerals. The buffer 150 has the following functions. (i) Input packet data and intermediate data in synchronization with the clock, and write them into the FIFO memory. (ii) The packet data and intermediate data held in the FIFO memory are read and output to the buses 108 and 109. (iii) When the back pressure signal line 92 is asserted, reading of packet data and intermediate data from the FIFO memory is stopped. While the reading from the FIFO memory is stopped, the packet data and the intermediate data are written. Therefore, in order to prevent the FIFO memory from being insufficient, the FIFO data is written according to the packet data to be written while the reading is stopped. Memory capacity is determined. (iv) When the back pressure signal line 92 is negated, reading of packet data and intermediate data from the FIFO memory is resumed.
[0069]
Since the back pressure signal line 92 is not input to the packet data processor 152 # i (i = 1 to B) before the data addition / deletion mechanism unit 154, the data addition / deletion mechanism unit 154 receives the data Packet processing is not stopped while the additional processing is executed. The data addition / deletion mechanism unit 154 is not different from the configuration of the data addition / deletion mechanism unit 112 shown in FIG. 12, and asserts the back pressure signal line 92 when the buffer 122 in FIG. However, since the back pressure signal line 92 is not input to the packet data processor 152 # i but is input to the buffer 150, the operation of the packet data processor 152 # i does not stop, so the packet data processor 152 # The packet data at i is input even while the back pressure signal line 92 is asserted.
[0070]
Therefore, when the back pressure signal line 92 is asserted, there is not enough free space in the buffer so that the expansion / contraction buffer configured as in FIG. 12 does not overflow even if all the packets in the packet data processor 152 # i are input. I must. By asserting the back pressure signal line 92, when sufficient space is generated in the expansion / contraction buffer, the data addition / deletion mechanism unit 154 negates the back pressure signal line 92 so as to restart the input of the packet to the buffer 150. Hereinafter, the operation of the packet data processing apparatus 140 of FIG. 20 will be described.
[0071]
(1) Operation of reception interface card 142 # i
The reception interface unit 70 # i and the pre-processing unit 72 # i in each reception interface card 142 # i operate in the same manner as in the first embodiment.
[0072]
(A) Writing / reading packet data
The buffer 150 inputs packet data and intermediate data in synchronization with the clock, and sequentially writes them into the FIFO memory. When the back pressure signal line 92 is negated, the packet data and intermediate data held in the FIFO memory are read and output to the packet data processor group at the next stage.
[0073]
(B) Determination of data addition / deletion
The packet data processors 152 # 1,..., 152 # B prior to the data addition / deletion mechanism unit 150 are packet processors 90 # 1,..., Upstream from the packet data processor 90 # A in FIG. Processing similar to 90 # C is performed. Similar to the packet data processor 90 # B, the packet data processor 152 # B determines whether or not to perform processing for adding / deleting data to / from the packet based on the header of the packet. Write the relevant intermediate data to the intermediate data register.
[0074]
(C) Operation of the data addition / deletion mechanism unit 154
The data addition / deletion mechanism unit 154 performs data addition / deletion processing similar to that of the second embodiment. When data expansion is performed, if the buffer configured similarly to the buffer 122 in FIG. 12 is likely to run out, the back pressure signal line 92 is asserted. At this time, since the back pressure signal line 92 is not input to the packet data processor 152 # i but is input to the buffer 150, the packet data processor 152 # i (i = 1, 2,..., B) Since the data is not stopped, the packet data in the packet data processor 152 # i (i = 1, 2,..., B) is not backed while the data addition / deletion mechanism unit 154 is asserting the back pressure signal line 92. Even while the pressure signal line 92 is asserted, the data addition / deletion mechanism unit 150 operates without stopping.
[0075]
The fact that the packet data processor 152 # i does not stop means that, for example, data is passed from the outside when two clocks have passed after execution of a certain instruction, and the packet data processor 152 # i performs processing based on that data. Since a certain process must be performed after a fixed clock from such a process, the packet data processor 152 # i cannot be stopped. Even in such a case, the packet data can be added. When the buffer 122 has enough space by asserting the back pressure signal line 92, the data adding / deleting mechanism unit 154 negates the back pressure signal line 92 to resume the input of the packet to the buffer 150. To do. In this embodiment, the buffer 150 corresponding to the back pressure is included in the packet data processor group 144 # i as a configuration. However, if the upstream processing unit 72 # i has a buffer, the upstream processing unit 72 # i may also function as the buffer 150.
[0076]
The present invention includes the following supplementary notes.
[0077]
(Supplementary note 1) In a packet data processing apparatus having a packet data processing group composed of a plurality of packet data processing units configured in a pipeline to process each input packet and output to the subsequent stage,
A data adding unit provided in a first packet data processing unit in the packet data processing group for adding the data to be added to an input packet;
While the data adding unit is performing the data adding process, the first packet data processing unit is instructed to stop outputting packets before the first packet data processing unit, and after the data adding process is completed, the first packet data A control unit instructing the output of the packet to be resumed at the front stage of the processing unit;
A packet data processing apparatus comprising:
[0078]
(Supplementary Note 2) The control unit instructs all the packet data processing units upstream of the first packet data processing unit to stop and restart the output of the packet, and the previous packet of the first packet data processing unit. The packet data processing apparatus according to appendix 1, wherein the data processing unit stops and restarts the output of the packet based on an instruction from the control unit.
[0079]
(Additional remark 3) The 2nd packet data processing part in the said packet data processing group of the front | former stage of the said 1st packet data processing part determines whether it is necessary to add data based on the input packet And an additional information generation unit that calculates additional data, additional data length, and additional position based on the input packet and outputs to the subsequent stage when the determination unit determines that data needs to be added. The packet data processing device according to appendix 1, wherein the data adding unit adds data based on the additional data, the additional data length, and the additional position.
[0080]
(Supplementary Note 4) The data adding unit includes a processor, a first shift register having a first number of stages having a first bit width for holding the packet, a second bit width for holding the additional data, the additional data length, and the additional position. A second shift register of the second number of stages, stopping the shift operation of the first shift register based on the additional data length and the predetermined register of the first shift register for packet data located behind the additional position 4. The packet data processing apparatus according to appendix 3, wherein data addition is performed by writing the additional data to the network.
[0081]
(Additional remark 5) In the packet data processing apparatus which has the packet data processing group comprised from the several packet data processing part by the pipeline structure which processes with respect to each input packet, and outputs to a back | latter stage,
A first memory having a predetermined data bus width provided in a first packet data processing unit in the packet data processing group;
Write the input packet to the first memory, read data from the beginning of the packet from the first memory, sequentially output the data bus width unit, and the data bus width unit data including the data at the additional position A memory control unit provided in the first packet data processing unit for repeatedly outputting based on the data addition length and the addition position;
Based on the data bus width, the additional position, and the additional data length, the data from the first data of the packet output from the first memory in units of data bus width to the additional position is output as it is, and the data is output from the additional position. For data after the additional data length, a reorder unit provided in the first packet data processing unit for selecting and outputting data after the data length to be deleted; and
A write unit provided in the first packet data processing unit for overwriting data at an additional position of a packet output from the reorder unit with additional data;
When the memory is insufficient, the front side of the first packet data processing unit is instructed to stop outputting the packet. When the memory is free, the front side of the first packet data processing unit A control unit for instructing to resume the output of the packet,
A packet data processing apparatus comprising:
[0082]
(Supplementary Note 6) A packet memory is further provided with a second memory that accumulates packet data in the previous stage of the packet data processing unit in the first stage of the packet data processing group and sequentially outputs from the head of the packet, and the control unit transmits the packet data to the second memory. The packet data processing device according to appendix 5, wherein the output is instructed to be stopped and restarted.
[0083]
【The invention's effect】
According to the present invention described above, it is also possible to take a technique of restricting packet input to a packet data processing unit preceding the packet data processing unit that performs processing for adding data to packet data when necessary. Thus, processing that increases the total length of the packet, such as addition of a header, is possible without impairing high-speed processing of the packet.
[Brief description of the drawings]
FIG. 1 is a principle diagram of the present invention.
FIG. 2 is a block diagram of a packet data processing apparatus according to the first embodiment of the present invention.
3 is a configuration diagram of a packet data processor group in FIG. 2;
4 is a block diagram of the packet data processor A in FIG. 3. FIG.
5 is a configuration diagram of a packet data processing processor B in FIG. 3;
FIG. 6 is a diagram showing a state of the packet data processor A after determination of data addition.
FIG. 7 is a diagram showing a state of the packet data processor A after two clocks.
FIG. 8 is a diagram illustrating a state of the packet data processor A after data movement.
FIG. 9 is a block diagram of a packet data processing apparatus according to a second embodiment of the present invention.
10 is a configuration diagram of a packet data processor group in FIG. 9;
11 is a configuration diagram of the packet data processing processor in FIG. 10;
12 is a configuration diagram of a data addition / deletion mechanism unit in FIG. 10;
13 is a configuration diagram of a reorder unit in FIG. 12. FIG.
FIG. 14 is a diagram illustrating a data expansion operation in units of bus width.
FIG. 15 is a diagram illustrating the operation of the reorder unit when data is added.
FIG. 16 is a diagram illustrating a data contraction operation in units of bus width.
FIG. 17 is a diagram illustrating a data contraction operation in units of bus width.
FIG. 18 is a diagram illustrating an operation of a reorder unit when data is deleted.
FIG. 19 is a diagram illustrating the operation of the reorder unit when data is deleted.
FIG. 20 is a block diagram of a packet data processing apparatus according to a third embodiment of the present invention.
FIG. 21 is a configuration diagram of the packet data processor group in FIG. 20;
FIG. 22 is a diagram illustrating a conventional store and forward packet processing method.
FIG. 23 is a block diagram of a packet data processing processor.
FIG. 24 is a diagram illustrating a hardware configuration in which a plurality of packet data processors are arranged.
FIG. 25 is a diagram showing a network configuration in which two private networks are connected by a shared network.
FIG. 26 is a diagram illustrating a state of a packet data processor before data addition / deletion;
FIG. 27 is a diagram illustrating a state of a shift register when packets are closely connected.
[Explanation of symbols]
50 # i (i = 1, 2,...) Packet data processing unit
50 # A first packet data processing unit
52 packet data processing group
54 Data addition part
56 Control unit

Claims (5)

それぞれが入力されたパケットに対して処理をして後段に出力するパイプライン構成された複数のパケットデータ処理部から構成されるパケットデータ処理群を有するパケットデータ処理装置において、
入力されたパケットにデータを付加する前記パケットデータ処理群中の第1パケットデータ処理部に設けられたデータ付加部と、
入力されたパケットにデータを付加するとき、当該付加対象パケットの前パケットとの間隔を少なくとも付加データ長分確保するために、前記第1パケットデータ処理部の前段のパケットデータ処理部にパケットの出力の停止を指示し、前パケットとの間隔が確保されると、前記第1パケットデータ処理部の前段のパケットデータ処理部にパケットの出力を再開するよう指示する制御部と、
を具備したことを特徴とするパケットデータ処理装置。
In a packet data processing apparatus having a packet data processing group composed of a plurality of packet data processing units configured in a pipeline to process each input packet and output to the subsequent stage,
A data adding unit provided in a first packet data processing unit in the packet data processing group for adding data to an input packet;
When data is added to the input packet, the packet is output to the packet data processing unit upstream of the first packet data processing unit in order to secure at least the additional data length interval with the previous packet of the packet to be added A control unit that instructs the packet data processing unit in the previous stage of the first packet data processing unit to resume the output of the packet when the interval with the previous packet is secured,
A packet data processing apparatus comprising:
前記第1パケットデータ処理部の前段の前記パケットデータ処理群中の第2パケットデータ処理部は、入力されたパケットに基づいてデータを付加する必要が有るか否かを判断する判断部と、前記判断部がデータを付加する必要が有ると判断したとき、入力されたパケットに基づいて、付加データ、付加データ長及び付加位置を算出して、後段に出力する付加情報生成部とを更に具備し、前記データ付加部は、前記付加データ、付加データ長及び付加位置に基づいて、データを付加することを特徴とする請求項1記載のパケットデータ処理装置。A second packet data processing unit in the packet data processing group preceding the first packet data processing unit; a determination unit that determines whether or not data needs to be added based on an input packet; And an additional information generation unit that calculates additional data, additional data length, and additional position based on the input packet when the determination unit determines that data needs to be added, and outputs the calculated data to a subsequent stage. 2. The packet data processing apparatus according to claim 1, wherein the data adding unit adds data based on the additional data, an additional data length, and an additional position. 前記データ付加部は、プロセッサ、前記パケットを保持する第1ビット幅の第1段数の第1シフトレジスタ、前記付加データ、前記付加データ長及び前記付加位置を保持する第2ビット幅の第2段数の第2シフトレジスタを有し、前記付加データ長に基づき前記付加位置よりも後ろに位置するパケットデータを格納する第1シフトレジスタのシフト動作の停止及び前記第1シフトレジスタに前記付加データの書き込みを前記プロセッサが実施することによりデータ付加を行うことを特徴とする請求項2記載のパケットデータ処理装置。The data adding unit includes a processor, a first shift register having a first stage number having a first bit width for holding the packet, a second stage number having a second bit width for holding the additional data, the additional data length, and the additional position. The shift operation of the first shift register for storing packet data located behind the additional position based on the additional data length is stopped, and the additional data is written to the first shift register. 3. The packet data processing apparatus according to claim 2, wherein the data is added by the processor executing the above. それぞれが入力されたパケットに対して処理をして後段に出力するパイプライン構成された複数のパケットデータ処理部から構成されるパケットデータ処理群を有するパケットデータ処理装置において、
前記パケットデータ処理群中の第1パケットデータ処理部に設けられた所定データバス幅の第1メモリと、
入力されたパケットを前記第1メモリに書き込み、パケットの先頭からデータを前記第1メモリより読み込み前記データバス幅単位に順次出力し、前記付加位置のデータが含まれる前記データバス幅単位のデータを前記データ付加長及び前記付加位置に基づいて繰り返して出力する前記第1パケットデータ処理部に設けられたメモリ制御部と、
前記データバス幅、前記付加位置及び前記付加データ長に基づき、前記第1メモリからデータバス幅単位に出力されるパケットの先頭データから付加位置までのデータについては、そのまま出力し、前記付加位置から付加データ長よりも後のデータについては、削除するべきデータ長だけ後のデータを選択して出力する前記第1パケットデータ処理部に設けられたリオーダ部と、
前記リオーダ部より出力されるパケットの付加位置にあるデータを付加データで上書きする前記第1パケットデータ処理部に設けられたライト部と、
前記第1メモリの空きが足りなくなったとき、前記第1パケットデータ処理部の前段側にパケットの出力の停止を指示し、前記第1メモリの空きが確保されたとき、前記第1パケットデータ処理部の前段側にパケットの出力を再開するよう指示する制御部と、
を具備したことを特徴とするパケットデータ処理装置。
In a packet data processing apparatus having a packet data processing group composed of a plurality of packet data processing units configured in a pipeline to process each input packet and output to the subsequent stage,
A first memory having a predetermined data bus width provided in a first packet data processing unit in the packet data processing group;
Write the input packet to the first memory, read data from the beginning of the packet from the first memory, sequentially output the data bus width unit, and the data bus width unit data including the data at the additional position A memory control unit provided in the first packet data processing unit for repeatedly outputting based on the data addition length and the addition position;
Based on the data bus width, the additional position, and the additional data length, the data from the first data of the packet output from the first memory in units of data bus width to the additional position is output as it is, and from the additional position, For data after the additional data length, a reorder unit provided in the first packet data processing unit for selecting and outputting data after the data length to be deleted; and
A write unit provided in the first packet data processing unit for overwriting data at an additional position of a packet output from the reorder unit with additional data;
When there is not enough free space in the first memory, the first packet data processing unit is instructed to stop outputting packets, and when free space in the first memory is secured, the first packet data processing is performed. A control unit that instructs the upstream side of the unit to resume the output of the packet;
A packet data processing apparatus comprising:
パケットデータを蓄積し、パケットの先頭から順次出力する第2メモリを前記パケットデータ処理群の初段のパケットデータ処理部の前段に更に設け、前記制御部は、前記第2メモリにパケットの出力の停止及び再開を指示することを特徴とする請求項4記載のパケットデータ処理装置。A second memory for accumulating packet data and sequentially outputting the packet data from the beginning of the packet is further provided in front of the first packet data processing unit of the packet data processing group, and the control unit stops outputting packets to the second memory. 5. The packet data processing apparatus according to claim 4, wherein a restart instruction is issued.
JP2001039392A 2001-02-16 2001-02-16 Packet data processing device Expired - Fee Related JP4183920B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001039392A JP4183920B2 (en) 2001-02-16 2001-02-16 Packet data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001039392A JP4183920B2 (en) 2001-02-16 2001-02-16 Packet data processing device

Publications (2)

Publication Number Publication Date
JP2002247095A JP2002247095A (en) 2002-08-30
JP4183920B2 true JP4183920B2 (en) 2008-11-19

Family

ID=18902189

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001039392A Expired - Fee Related JP4183920B2 (en) 2001-02-16 2001-02-16 Packet data processing device

Country Status (1)

Country Link
JP (1) JP4183920B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5865067B2 (en) 2011-12-26 2016-02-17 キヤノン株式会社 Data transfer apparatus and data transfer method
WO2013157582A1 (en) * 2012-04-18 2013-10-24 日本電気株式会社 Design assistance device, design assistance method and program

Also Published As

Publication number Publication date
JP2002247095A (en) 2002-08-30

Similar Documents

Publication Publication Date Title
US6831923B1 (en) Pipelined multiple issue packet switch
US7239635B2 (en) Method and apparatus for implementing alterations on multiple concurrent frames
US7769015B2 (en) High performance network adapter (HPNA)
US8620940B1 (en) Pattern matching
JP5304194B2 (en) Barrier synchronization apparatus, barrier synchronization system, and control method of barrier synchronization apparatus
US6978459B1 (en) System and method for processing overlapping tasks in a programmable network processor environment
USRE43825E1 (en) System and method for data forwarding in a programmable multiple network processor environment
JP2002057698A (en) Packet data processor
US8243737B2 (en) High speed packet FIFO input buffers for switch fabric with speedup and retransmit
JPH0771111B2 (en) Packet exchange processor
JP4203979B2 (en) Packet processing device
US7224701B2 (en) Method and apparatus for implementing frame header alterations using byte-wise arithmetic logic units
JP2008310832A (en) Apparatus and method for distributing signal from high level data link controller to a plurality of digital signal processor cores
JP2001134527A (en) Adapter for bus switch, bridge for bus switch, bus switch, and bus switch system
JP4183920B2 (en) Packet data processing device
JP4342128B2 (en) Packet processor and packet processor system
JP4342100B2 (en) Packet processing device
JP2013196509A (en) Information processor and control method of the same
US20190391840A1 (en) Memory module
JP3684579B2 (en) Processor element of distributed parallel computer
JP2778520B2 (en) Multicast method and switching switch
JP3704367B2 (en) Switch circuit
JP3583032B2 (en) Vector diffusion processor
JP2001350714A (en) Data processor
JPH10111798A (en) Information processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060721

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080821

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080902

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080903

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

Free format text: PAYMENT UNTIL: 20110912

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees