Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3662859B2 - Packet relay device - Google Patents
[go: Go Back, main page]

JP3662859B2 - Packet relay device - Google Patents

Packet relay device Download PDF

Info

Publication number
JP3662859B2
JP3662859B2 JP2001161320A JP2001161320A JP3662859B2 JP 3662859 B2 JP3662859 B2 JP 3662859B2 JP 2001161320 A JP2001161320 A JP 2001161320A JP 2001161320 A JP2001161320 A JP 2001161320A JP 3662859 B2 JP3662859 B2 JP 3662859B2
Authority
JP
Japan
Prior art keywords
packet
random number
field
buffer
uniform
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
JP2001161320A
Other languages
Japanese (ja)
Other versions
JP2002354026A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2001161320A priority Critical patent/JP3662859B2/en
Publication of JP2002354026A publication Critical patent/JP2002354026A/en
Application granted granted Critical
Publication of JP3662859B2 publication Critical patent/JP3662859B2/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】
【従来の技術】
パケット中継装置におけるパケット送信待ちキューの輻輳回避のため、送信待ちキューの蓄積データ量に応じて確率的にパケットを廃棄、もしくはマークするアルゴリズムとして、RED(Random Early Detection)と称されるものが提案されている(S. Floyd and V. Jacobson, Random Early Detection Gateways for Congestion Avoidance, ACM/IEEE Transactions on Networking, 1(4): 397-413, 1993.)。こうしたアルゴリズムにおいては、パケットの廃棄やマークのための確率計算を実行する場合に乱数を生成する必要がある。このため、REDのように確率計算を伴うアルゴリズムを実装するパケット中継装置では、送信待ちキューにパケットが到着する毎に動的に確率計算に必要な乱数を生成するのが一般的である。
【0003】
【発明が解決しようとする課題】
ところで、上述した乱数の生成がプログラムによる場合には、乱数の精度によって異なるものにはなるものの、少なくとも数ステップの四則演算を含む一様乱数生成関数を実行する必要があり、パケット中継に伴う処理負荷増大の一因となる。こうした処理負荷増大の問題を解決するには、例えば特許第3074107号公報に示されているような専用の確率変数発生装置を適用し、ハードウェアによって乱数の生成を行うことが考えられる。
【0004】
図5は、この種の確率変数発生装置の構成例を示したブロック図である。図5において、101は時間信号発生手段、102は一様乱数発生手段、103は記憶手段、104は四則演算手段、105は定数発生手段、110はこれらを含む確率変数発生装置である。この確率変数発生装置110は、一様乱数発生手段102の出力を、記憶手段103に記憶された所望の確率分布の累積度関数値を参照して変換し、四則演算手段104を経由して出力することで所望の確率分布に従う確率変数を適切なタイミングで発生するものであり、このタイミングを得るための時間信号発生手段101や四則演算手段104に定数を供給するための定数発生手段105を含んでいる。
【0005】
上記のような確率変数発生装置110を内蔵するパケット中継装置によれば、ハードウェアによって乱数を生成するようにしているため、パケット中継に伴う処理負荷の増大を招来することがない。
【0006】
しかしながら、こうしたハードウェアによって乱数を生成する場合には、図5に示したすべての構成や機構が必ずしも必要となることはないにせよ、最小限の構成や機構をパケット中継装置に内蔵させる必要がある。この結果、パケット中継装置の構成が複雑になるとともに、製造コストを増大することになる。
【0007】
この発明は上記実情に鑑みてなされたもので、構成の複雑化およびコスト増を招来することなくパケット中継に伴う処理負荷の低減を図ることのできるパケット中継装置を得ることを目的とする。
【0008】
【課題を解決するための手段】
上記目的を達成するため、この発明にかかるパケット中継装置は、パケットを格納するためのパケットバッファを初期化する際に一様乱数を発生させて該パケットバッファの各パケット格納フィールドに付随するフィールドに前記一様乱数を格納しておき、パケット中継時においては任意の空きパケット格納フィールドを割り当てる一方、送信時の確率計算を行う場合にはパケットを格納したパケット格納フィールドに附随するフィールドの値を読み出してこれを乱数として用いることを特徴とする。
【0009】
この発明によれば、パケットを格納したパケット格納フィールドに付随する乱数フィールドを読み出すことにより乱数値を取得するようにしているため、確率計算の際に数ステップの四則演算を含む一様乱数生成関数を実行する必要がなくなる。しかも、パケット毎に乱数を発生する必要がないため、乱数を生成するための手段としては、必ずしもハードウェアを用いる必要がなく、ソフトウェアによって生成した疑似乱数を一様乱数として用いることができる。
【0010】
つぎの発明にかかるパケット中継装置は、上記の発明において、パケット中継時の処理負荷が低い場合、もしくは所定の周期に従って一様乱数を発生させ、前記パケット格納フィールドに付随するフィールドに格納した一様乱数を更新することを特徴とする。
【0011】
この発明によれば、パケット中継時の処理負荷が低い場合、もしくは所定の周期に従ってパケット格納フィールドに付随するフィールドに格納した一様乱数の値が更新される。
【0012】
つぎの発明にかかるパケット中継装置は、パケットを格納するためのパケットバッファを初期化する際に、パケット格納フィールドと1対1に対応付けられたエントリを有する乱数テーブルを生成するとともに、一様乱数を発生させて該乱数テーブルのエントリに前記一様乱数を格納しておき、パケット中継時においては任意の空きパケット格納フィールドを割り当てる一方、送信時の確率計算を行う場合にはパケットを格納したパケット格納フィールドに対応するエントリの値を読み出してこれを乱数として用いることを特徴とする。
【0013】
この発明によれば、パケットを格納したパケット格納フィールドに簡単な規則で対応付けた乱数テーブルのエントリを読み出すことにより乱数値を取得するようにしているため、確率計算の際に数ステップの四則演算を含む一様乱数生成関数を実行する必要がなくなる。しかも、パケット毎に乱数を発生する必要がないため、乱数を生成するための手段としては、必ずしもハードウェアを用いる必要がなく、ソフトウェアによって生成した疑似乱数を一様乱数として用いることができる。
【0014】
つぎの発明にかかるパケット中継装置は、上記の発明において、パケット中継時の処理負荷が低い場合、もしくは所定の周期に従って一様乱数を発生させ、前記乱数テーブルのエントリに格納した一様乱数を更新することを特徴とする。
【0015】
この発明によれば、パケット中継時の処理負荷が低い場合、もしくは所定の周期に従って乱数テーブルのエントリに格納した一様乱数が更新される。
【0016】
つぎの発明にかかるパケット中継装置は、上記の発明において、前記パケットバッファに、各バッファ格納フィールドに付随するポインタフィールドを設けるとともに、該ポインタフィールドに格納したポインタの値に従って前記バッファ格納フィールドを前記乱数テーブルのエントリに1対1に対応付けたことを特徴とする。
【0017】
この発明によれば、パケットを格納したパケット格納フィールドに付随するポインタフィールドから指示された乱数テーブルのエントリを読み出すことにより乱数値を取得するようにしているため、確率計算の際に数ステップの四則演算を含む一様乱数生成関数を実行する必要がなくなる。しかも、パケット毎に乱数を発生する必要がないため、乱数を生成するための手段としては、必ずしもハードウェアを用いる必要がなく、ソフトウェアによって生成した疑似乱数を一様乱数として用いることができる。
【0018】
つぎの発明にかかるパケット中継装置は、上記の発明において、パケット中継時の処理負荷が低い場合、もしくは所定の周期に従って前記ポインタフィールドに格納したポインタの値を更新することを特徴とする。
【0019】
この発明によれば、パケット中継時の処理負荷が低い場合、もしくは所定の周期に従ってポインタフィールドに格納したポインタの値が更新される。
【0020】
【発明の実施の形態】
以下に添付図面を参照して、この発明にかかるパケット中継装置の好適な実施の形態を詳細に説明する。
【0021】
実施の形態1.
図1は、この発明に実施の形態1であるパケット中継装置の構成例を示すブロック図である。ここで例示するパケット中継装置は、蓄積転送型のもので、パケットバッファ10、乱数発生部20、送信待ちキュー30および中継制御部40を備えている。パケットバッファ10は、パケット受信時にパケットを格納する一方、パケット送信時にパケットを読み出すn個のパケット格納フィールド11−1〜11−nを有するとともに、各パケット格納フィールド11−1〜11−nに付随して乱数を格納するn個の乱数フィールド12−1〜12−nを有している。乱数発生部20は、パケットバッファ10の初期化時に一様乱数を発生させ、該一様乱数をパケットバッファ10の乱数フィールド12−1〜12−nにそれぞれ与える部分である。これは、例えばパケットバッファ10の乱数フィールド12−1〜12−nとして8ビットのメモリ領域を用いる場合であれば、0〜255の範囲の値を同等の確率で生じるような一様乱数生成関数をプログラムし、パケットバッファ10の初期化時にこの関数を起動して出力される値を乱数フィールド12−1〜12−nに格納することで実現することができる。送信待ちキュー30は、送信待ち行列を格納するバッファであり、送信方路毎にm個のキューフィールド31−1〜31−mを有している。中継制御部40は、受信したパケットのパケットヘッダ情報に基づいて送信方路を決定する部分である。
【0022】
以下、上記パケット中継装置の動作について説明する。まず、パケット中継装置は、上述したように、パケットバッファ10の初期化時に中継制御部40からの指示により、乱数発生部20において一様乱数を発生し、該一様乱数をパケットバッファ10の各乱数フィールド12−1〜12−nに格納する処理を実施する。
【0023】
上述した状態から、上記パケット中継装置は、パケットを受信する場合に中継制御部40がパケットバッファ10の中で空いているものの一つ、例えばパケット格納フィールド11−1を割り当て、これに受信パケットを格納する。この場合、受信パケットの内容に依存することなく、空いているパケット格納フィールド11−1〜11−nを割り当てる。さらにパケット中継装置は、中継制御部40がパケット格納フィールド11−1〜11−nに格納した受信パケットのパケットヘッダ情報を読み出して処理するとともに、該受信パケットの送信方路を決定する。例えば、パケット格納フィールド11−1に格納された受信パケットは、中継制御部40によって送信方路に送信待ちキュー30の該当するキューフィールド31−1に転送され、該キューフィールド31−1に保持されて送信処理が行われる。
【0024】
ここで、上述したREDのように確率的にパケットを廃棄、もしくはマークするアルゴリズムを適用している場合には、送信待ちキュー30に保持する以前に、受信パケットを格納したパケット格納フィールド11−1〜11−nについて確率計算を行う必要がある。
【0025】
この場合、本実施の形態1においては、従前のごとくプログラムによる乱数生成関数や専用の確率変数発生装置を用いるのではなく、確率計算で必要となる乱数として、受信パケットを格納したパケット格納フィールド11−1〜11−nに附随する乱数フィールド12−1〜12−nの一様乱数値を用いる。乱数フィールド12−1〜12−nから読み出した値を乱数と見なすことができる理由は以下の通りである。すなわち、通常多くの端末が独立に送信したパケットをパケット中継装置が受信した場合、該パケット中継装置は、受信パケットの内容に依存することなく空いているパケット格納フィールド11−1〜11−nを任意に割り当てる。つまり、受信パケットをパケットバッファ10のどのパケット格納フィールド11−1〜11−nに割り当てるかは、ランダムと見なすことができる。従って、パケットバッファ10の初期化時にのみ乱数発生部20において発生した一様乱数をパケットバッファ10の乱数フィールド12−1〜12−nに格納する処理を実施し、その後、パケット格納フィールド11−1〜11−nに附随する乱数フィールド12−1〜12−nの値がパケット毎に都度変化しない場合であっても、パケット中継装置が受信する一連のパケットに対しそれらが格納されるパケットバッファ10に附随する乱数フィールド12−1〜12−nを読み出して得られた値をランダムな数値列と見なすことができる。
【0026】
このように、上記パケット中継装置によれば、パケットを格納したパケット格納フィールド11−1〜11−nに付随する乱数フィールド12−1〜12−nを読み出すことにより乱数値を取得するようにしているため、REDに伴う確率計算の際に、数ステップの四則演算を含む一様乱数生成関数を実行する必要がなくなり、処理負荷を著しく低減することができる。しかも、乱数を生成するためのハードウェア構成としては、唯一乱数発生部20を設けるだけであり、図5に示した専用の確率変数発生装置、つまり時間信号発生部101、一様乱数発生部102、記憶部103、四則演算部104、定数発生部105等々、多数の構成や機構を含んだ確率変数発生装置が不要となる。従って、パケット中継装置の構成が複雑化する事態やコストを増大させる事態を招来する虞れがない。因に、上記パケット中継装置にあっては、パケット毎に乱数を発生する必要がないため、乱数を生成するための手段として、必ずしも乱数発生部20を設ける必要はなく、ソフトウェアによって生成した疑似乱数を一様乱数として用いることが可能である。
【0027】
なお、上述した実施の形態1では、パケットバッファ10のパケット格納フィールド11−1〜11−nに格納した受信パケットをそのまま送信待ちキュー30のキューフィールド31−1〜31−mに転送させるようにしているが、受信パケットを適宜コピーしながら複数段のパケットバッファを経由して送信待ちキューに転送させるようにしたパケット中継装置にも適用することが可能である。この場合、各パケットバッファのパケット格納フィールドにそれぞれ乱数フィールドを附随させ、パケット受信時にパケットを格納するパケットバッファ、つまり第1段となるパケットバッファのパケット格納フィールドに附随する乱数フィールドから得られる乱数値を順次コピーするようにしてもよい。あるいは、最終段となるパケットバッファのパケット格納フィールドが選択される際のランダム性を利用し、この最終段となるパケットバッファにのみ乱数フィールドを設けてその初期化時に各パケット格納フィールドに付随する乱数フィールドに一様乱数を格納するようにしてもよい。
【0028】
また、上述した実施の形態1では、パケットバッファ10の初期化時にのみ一様乱数を発生するようにしているが、パケット中継装置の処理負荷が低い時、あるいは定期的に、パケットバッファ10の初期化時と同様の方法を用いて一様乱数を発生させ、乱数フィールド12−1〜12−nに格納し直すことも可能である。このようにして乱数フィールド12−1〜12−nの値を更新した場合には、乱数フィールド12−1〜12−nの値がパケット毎には変化しないことに起因する乱数値の偏りを軽減することが可能になる。
【0029】
実施の形態2.
図2は、この発明に実施の形態2であるパケット中継装置の構成例を示すブロック図である。ここで例示するパケット中継装置は、蓄積転送型のもので、パケットバッファ10、乱数テーブル50、乱数発生部20、送信待ちキュー30および中継制御部40を備えている。パケットバッファ10は、パケット受信時にパケットを格納する一方、パケット送信時にパケットを読み出すn個のパケット格納フィールド11−1〜11−nを有している。乱数テーブル50は、n個のエントリ51−1〜51−nを有したもので、各エントリ51−1〜51−nが1対1の対応関係を与える簡単な規則でパケットバッファ10の各パケット格納フィールド11−1〜11−nに対応付けてある。本実施の形態2においては、図3に示すような態様で、パケットバッファ10の各パケット格納フィールド11−1〜11−nと乱数テーブル50の各エントリ51−1〜51−nとに1対1の対応関係を与えるようにしている。すなわち、パケットバッファ10のパケット格納フィールド11−1〜11−nにそれぞれ個々の位置を示す添字iを順次付すとともに、乱数テーブル50のエントリ51−1〜51−nにそれぞれ個々の位置を示す添字iを順次付し、これらの添字iが同一となるものを互いに対応付けるようにしている。なお、パケットバッファ10のパケット格納フィールド11−1〜11−nと乱数テーブル50のエントリ51−1〜51−nとの対応関係は、必ずしもこれに限らず、両者が1対1に対応すれば、他の規則を用いても構わない。乱数発生部20は、パケットバッファ10の初期化時に一様乱数を発生させ、該一様乱数を乱数テーブル50のエントリ51−1〜51−nにそれぞれ与える部分である。これは、例えば乱数テーブル50のエントリ51−1〜51−nが8ビットの長さを有するものであれば、0〜255の範囲の値を同等の確率で生じるような一様乱数生成関数をプログラムし、パケットバッファ10の初期化時にこの関数を起動して出力される値をエントリ51−1〜51−nに格納することで実現することができる。送信待ちキュー30は、送信待ち行列を格納するバッファであり、送信方路毎にm個のキューフィールド31−1〜31−mを有している。中継制御部40は、受信したパケットのパケットヘッダ情報に基づいて送信方路を決定する部分である。
【0030】
以下、上記パケット中継装置の動作について説明する。まず、パケット中継装置は、上述したように、パケットバッファ10の初期化時に中継制御部40からの指示により乱数発生部20において一様乱数を発生し、該一様乱数を乱数テーブル50のエントリ51−1〜51−nに格納する処理を実施する。
【0031】
上述した状態から、上記パケット中継装置は、パケットを受信する場合に中継制御部40がパケットバッファ10の中で空いているものの一つ、例えばパケット格納フィールド11−1を割り当て、これに受信パケットを格納する。この場合、受信パケットの内容に依存することなく、空いているパケット格納フィールド11−1〜11−nを割り当てる。さらにパケット中継装置は、中継制御部40がパケット格納フィールド11−1〜11−nに格納した受信パケットのパケットヘッダ情報を読み出して処理するとともに、該受信パケットの送信方路を決定する。例えば、パケット格納フィールド11−1に格納された受信パケットは、中継制御部40によって送信方路に送信待ちキュー30の該当するキューフィールド31−1に転送され、該キューフィールド31−1に保持されて送信処理が行われる。
【0032】
ここで、上述したREDのように確率的にパケットを廃棄、もしくはマークするアルゴリズムを適用している場合には、送信待ちキュー30に保持する以前に、受信パケットを格納したパケット格納フィールド11−1〜11−nについて確率計算を行う必要がある。
【0033】
この場合、本実施の形態2においては、従前のごとくプログラムによる乱数生成関数や専用の確率変数発生装置を用いるのではなく、確率計算で必要となる乱数として、受信パケットを格納したパケット格納フィールド11−1〜11−nに簡単な規則で対応付けたエントリ51−1〜51−nの一様乱数値を用いる。乱数テーブル50のエントリ51−1〜51−nから読み出した値を乱数と見なすことができる理由は実施の形態1と同様である。
【0034】
このように、上記パケット中継装置によれば、パケットを格納したパケット格納フィールド11−1〜11−nに簡単な規則で対応付けた乱数テーブル50のエントリ51−1〜51−nを読み出すことにより乱数値を取得するようにしているため、REDに伴う確率計算の際に、数ステップの四則演算を含む一様乱数生成関数を実行する必要がなくなり、処理負荷を著しく低減することができる。しかも、乱数を生成するためのハードウェア構成としては、乱数発生部20および乱数テーブル50を設けるだけであり、多数の構成や機構を含んだ確率変数発生装置が不要となる。従って、パケット中継装置の構成が複雑化する事態やコストを増大させる事態を招来する虞れがない。因に、上記パケット中継装置にあっては、パケット毎に乱数を発生する必要がないため、乱数を生成するための手段として、必ずしも乱数発生部20を設ける必要はなく、ソフトウェアによって生成した疑似乱数を一様乱数として用いることが可能である。
【0035】
なお、上述した実施の形態2では、パケットバッファ10のパケット格納フィールド11−1〜11−nに格納した受信パケットをそのまま送信待ちキュー30のキューフィールド31−1〜31−mに転送させるようにしているが、受信パケットを適宜コピーしながら複数段のパケットバッファを経由して送信待ちキューに転送させるようにしたパケット中継装置にも適用することが可能である。この場合、最終段となるパケットバッファのパケット格納フィールドが選択される際のランダム性を利用し、該最終段となるパケットバッファにのみ対応する乱数テーブルを設け、最終段となるパケットバッファの初期化時に、各パケット格納フィールドに対応付けた乱数テーブルのエントリに一様乱数を格納してもよい。
【0036】
また、上述した実施の形態2では、パケットバッファ10の初期化時にのみ一様乱数を発生するようにしているが、パケット中継装置の処理負荷が低い時、あるいは定期的に、パケットバッファ10の初期化時と同様の方法を用いて一様乱数を発生させ、乱数テーブル50のエントリ51−1〜51−nに格納し直すことも可能である。このようにして乱数テーブル50の値を更新した場合には、エントリ51−1〜51−nの値がパケット毎には変化しないことに起因する乱数値の偏りを軽減することが可能になる。
【0037】
実施の形態3.
図4は、この発明に実施の形態3であるパケット中継装置の構成例を示すブロック図である。ここで例示するパケット中継装置は、蓄積転送型のもので、パケットバッファ10、乱数テーブル50、乱数発生部20、送信待ちキュー30および中継制御部40を備えている。パケットバッファ10は、パケット受信時にパケットを格納する一方、パケット送信時にパケットを読み出すn個のパケット格納フィールド11−1〜11−nを有するとともに、各パケット格納フィールド11−1〜11−nに付随してポインタを格納するn個のポインタフィールド13−1〜13−nを有している。乱数テーブル50は、n個のエントリ51−1〜51−nを有したものである。乱数発生部20は、パケットバッファ10の初期化時に一様乱数を発生させ、該一様乱数を乱数テーブル50のエントリ51−1〜51−nやパケットバッファ10のポインタフィールド13−1〜13−nに与える部分である。送信待ちキュー30は、送信待ち行列を格納するバッファであり、送信方路毎にm個のキューフィールド31−1〜31−mを有している。中継制御部40は、受信したパケットのパケットヘッダ情報に基づいて送信方路を決定する部分である。
【0038】
以下、上記パケット中継装置の動作について説明する。まず、パケット中継装置は、上述したように、パケットバッファ10の初期化時に中継制御部40からの指示により乱数発生部20において一様乱数を発生し、該一様乱数を乱数テーブル50のエントリ51−1〜51−nに格納する処理を実施する。さらに、パケット中継装置は、図中の矢印で示すように、パケットバッファ10のポインタフィールド13−1〜13−nに、乱数テーブル50のエントリ51−1〜51−nを1対1に指示するポインタを格納する。これらのポインタは、例えばポインタフィールド13−1〜13−nに対して乱数発生部20により一様乱数を発生させ、これによって得た値jを用いてj番目のエントリ51−1〜51−nを対応付ける。次のポインタフィールド13−1〜13−nに対しては、再び乱数発生部20により一様乱数を発生させ、これによって得た値k(≠j)を用いてk番目のエントリ51−1〜51−nを対応付ける。以下同様にしてランダムな手順により設定することができる。なお、ポインタによるポインタフィールド13−1〜13−nと乱数テーブル50のエントリ51−1〜51−nとの対応付けは、必ずしも上述した手順に限らず、例えばi番目のポインタフィールド13−1〜13−nに対してi番目のエントリ51−1〜51−nを対応させるといった、ランダムでない手順を用いることも可能である。
【0039】
上述した状態から、上記パケット中継装置は、パケットを受信する場合に中継制御部40がパケットバッファ10の中で空いているものの一つ、例えばパケット格納フィールド11−1〜11−nを割り当て、これに受信パケットを格納する。この場合、受信パケットの内容に依存することなく、空いているパケット格納フィールド11−1〜11−nを割り当てる。さらにパケット中継装置は、中継制御部40がパケット格納フィールド11−1〜11−nに格納した受信パケットのパケットヘッダ情報を読み出して処理するとともに、該受信パケットの送信方路を決定する。例えば、パケット格納フィールド11−1に格納された受信パケットは、中継制御部40によって送信方路に送信待ちキュー30の該当するキューフィールド31−1に転送され、該キューフィールド31−1に保持されて送信処理が行われる。
【0040】
ここで、上述したREDのように確率的にパケットを廃棄、もしくはマークするアルゴリズムを適用している場合には、送信待ちキュー30に保持する以前に、受信パケットを格納したパケット格納フィールド11−1〜11−nについて確率計算を行う必要がある。
【0041】
この場合、本実施の形態3においては、従前のごとくプログラムによる乱数生成関数や専用の確率変数発生装置を用いるのではなく、確率計算で必要となる乱数として、受信パケットを格納したパケット格納フィールド11−1〜11−nに付随するポインタフィールド13−1〜13−nからポインタによって指示された乱数テーブル50のエントリ51−1〜51−nの一様乱数値を用いる。乱数テーブル50のエントリ51−1〜51−nから読み出した値を乱数と見なすことができる理由は実施の形態1と同様である。
【0042】
このように、上記パケット中継装置によれば、パケットを格納したパケット格納フィールド11−1〜11−nに付随するポインタフィールド13−1〜13−nから指示された乱数テーブル50のエントリ51−1〜51−nを読み出すことにより乱数値を取得するようにしているため、REDに伴う確率計算の際に、数ステップの四則演算を含む一様乱数生成関数を実行する必要がなくなり、処理負荷を著しく低減することができる。しかも、乱数を生成するためのハードウェア構成としては、乱数発生部20および乱数テーブル50を設けるだけであり、多数の構成や機構を含んだ確率変数発生装置が不要となる。従って、パケット中継装置の構成が複雑化する事態やコストを増大させる事態を招来する虞れがない。因に、上記パケット中継装置にあっては、パケット毎に乱数を発生する必要がないため、乱数を生成するための手段として、必ずしも乱数発生部20を設ける必要はなく、ソフトウェアによって生成した疑似乱数を一様乱数として用いることが可能である。
【0043】
なお、上述した実施の形態3では、パケットバッファ10のパケット格納フィールド11−1〜11−nに格納した受信パケットをそのまま送信待ちキュー30に転送させるようにしているが、受信パケットを適宜コピーしながら複数段のパケットバッファを経由して送信待ちキューに転送させるようにしたパケット中継装置にも適用することが可能である。この場合、最終段となるパケットバッファのパケット格納フィールドが選択される際のランダム性を利用し、該最終段となるパケットバッファにのみポインタフィールドを設けるとともに、対応する乱数テーブルを設け、最終段となるパケットバッファの初期化時に、各パケット格納フィールドに対応付けた乱数テーブルのエントリ一様乱数を格納してもよい。
【0044】
また、上述した実施の形態3では、パケットバッファ10の初期化時にのみ一様乱数を発生するようにしているが、パケット中継装置の処理負荷が低い時、あるいは定期的に、パケットバッファ10の初期化時と同様の方法を用いて一様乱数を発生させ、乱数テーブル50のエントリ51−1〜51−nに格納し直すことも可能である。このようにして乱数テーブル50の値を更新した場合には、エントリ51−1〜51−nの値がパケット毎には変化しないことに起因する乱数値の偏りを軽減することが可能になる。
【0045】
さらに、上述した実施の形態3では、パケット中継装置の処理負荷が低い時、あるいは定期的に、パケットバッファ10の初期化時と同様のランダムな手順を用いて乱数テーブル50のエントリ51−1〜51−nとの1対1の対応関係を保ちつつ、ポインタフィールド13−1〜13−nのポインタを格納し直すことも可能である。このようにしてポインタフィールド13−1〜13−nのポインタを更新した場合、つまりパケットバッファ10のパケット格納フィールド11−1〜11−nと乱数テーブル50のエントリ51−1〜51−nとの対応付けを更新した場合には、ポインタフィールド13−1〜13−nのポインタがパケット毎には変化しないことに起因する乱数値の偏りを軽減することができる。
【0046】
【発明の効果】
以上説明したように、この発明によれば、パケットを格納したパケット格納フィールドに付随する乱数フィールドを読み出すことにより乱数値を取得するようにしているため、確率計算の際に数ステップの四則演算を含む一様乱数生成関数を実行する必要がなくなり、処理負荷を著しく低減することが可能になる。しかも、パケット毎に乱数を発生する必要がないため、乱数を生成するための手段としては、必ずしもハードウェアを用いる必要がなく、ソフトウェアによって生成した疑似乱数を一様乱数として用いることができるため、多数の構成や機構を含んだ確率変数発生装置を設けることに起因して構成が複雑化する事態やコストを増大させる事態を招来する虞れがない。
【0047】
つぎの発明によれば、パケット中継時の処理負荷が低い場合、もしくは所定の周期に従ってパケット格納フィールドに付随するフィールドに格納した一様乱数の値が更新されるため、パケット毎には変化しないことに起因する乱数値の偏りを軽減することが可能になる。
【0048】
つぎの発明によれば、パケットを格納したパケット格納フィールドに簡単な規則で対応付けた乱数テーブルのエントリを読み出すことにより乱数値を取得するようにしているため、確率計算の際に数ステップの四則演算を含む一様乱数生成関数を実行する必要がなくなり、処理負荷を著しく低減することが可能になる。しかも、パケット毎に乱数を発生する必要がないため、乱数を生成するための手段としては、必ずしもハードウェアを用いる必要がなく、ソフトウェアによって生成した疑似乱数を一様乱数として用いることができるため、多数の構成や機構を含んだ確率変数発生装置を設けることに起因して構成が複雑化する事態やコストを増大させる事態を招来する虞れがない。
【0049】
つぎの発明によれば、パケット中継時の処理負荷が低い場合、もしくは所定の周期に従って乱数テーブルのエントリに格納した一様乱数が更新されるため、パケット毎には変化しないことに起因する乱数値の偏りを軽減することが可能になる。
【0050】
つぎの発明によれば、パケットを格納したパケット格納フィールドに付随するポインタフィールドから指示された乱数テーブルのエントリを読み出すことにより乱数値を取得するようにしているため、確率計算の際に数ステップの四則演算を含む一様乱数生成関数を実行する必要がなくなり、処理負荷を著しく低減することが可能になる。しかも、パケット毎に乱数を発生する必要がないため、乱数を生成するための手段としては、必ずしもハードウェアを用いる必要がなく、ソフトウェアによって生成した疑似乱数を一様乱数として用いることができるため、多数の構成や機構を含んだ確率変数発生装置を設けることに起因して構成が複雑化する事態やコストを増大させる事態を招来する虞れがない。
【0051】
つぎの発明によれば、パケット中継時の処理負荷が低い場合、もしくは所定の周期に従ってポインタフィールドに格納したポインタの値が更新されるため、ポインタフィールドのポインタがパケット毎には変化しないことに起因する乱数値の偏りを軽減することができる。
【図面の簡単な説明】
【図1】 この発明に実施の形態1であるパケット中継装置の構成例を示すブロック図である。
【図2】 この発明に実施の形態2であるパケット中継装置の構成例を示すブロック図である。
【図3】 パケットバッファのパケット格納フィールドと乱数テーブルのエントリとの対応関係を例示する概念図である。
【図4】 図4は、この発明に実施の形態3であるパケット中継装置の構成例を示すブロック図である。
【図5】 従来のパケット中継装置に適用される確率変数発生装置の構成例を示したブロック図である。
【符号の説明】
10 パケットバッファ、11−1〜11−n パケット格納フィールド、12−1〜12−n 乱数フィールド、13−1〜13−n ポインタフィールド、20 乱数発生部、30 送信待ちキュー、31−1〜31−m キューフィールド、40 中継制御部、50 乱数テーブル、51−1〜51−n エントリ。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a packet relay apparatus that relays packets by a storage relay system.
[0002]
[Prior art]
In order to avoid congestion of the packet transmission queue in the packet relay device, an algorithm called RED (Random Early Detection) is proposed as an algorithm for discarding or marking packets stochastically according to the amount of data stored in the transmission queue. (S. Floyd and V. Jacobson, Random Early Detection Gateways for Congestion Avoidance, ACM / IEEE Transactions on Networking, 1 (4): 397-413, 1993.). In such an algorithm, it is necessary to generate a random number when performing probability calculation for discarding or marking a packet. For this reason, in a packet relay apparatus that implements an algorithm involving probability calculation such as RED, it is common to dynamically generate a random number necessary for probability calculation every time a packet arrives in the transmission queue.
[0003]
[Problems to be solved by the invention]
By the way, when the random number generation described above is performed by a program, it is necessary to execute a uniform random number generation function including at least a few steps of four arithmetic operations, although it varies depending on the accuracy of the random number. Contributes to increased load. In order to solve such a problem of an increase in processing load, it is conceivable to apply a dedicated random variable generator as disclosed in Japanese Patent No. 3074107 and generate random numbers by hardware.
[0004]
FIG. 5 is a block diagram showing a configuration example of this type of random variable generation device. In FIG. 5, 101 is a time signal generation means, 102 is a uniform random number generation means, 103 is a storage means, 104 is an arithmetic operation means, 105 is a constant generation means, and 110 is a random variable generation apparatus including these. The random variable generator 110 converts the output of the uniform random number generator 102 with reference to the cumulative degree function value of the desired probability distribution stored in the storage unit 103, and outputs it via the four arithmetic units 104. Thus, a random variable according to a desired probability distribution is generated at an appropriate timing, and includes a time signal generating means 101 for obtaining this timing and a constant generating means 105 for supplying constants to the four arithmetic operation means 104. It is out.
[0005]
According to the packet relay device incorporating the random variable generator 110 as described above, random numbers are generated by hardware, so that an increase in processing load associated with packet relay is not caused.
[0006]
However, when generating random numbers using such hardware, it is not always necessary to have all the configurations and mechanisms shown in FIG. 5, but it is necessary to incorporate the minimum configurations and mechanisms in the packet relay apparatus. is there. As a result, the configuration of the packet relay device becomes complicated and the manufacturing cost increases.
[0007]
The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a packet relay apparatus capable of reducing the processing load accompanying packet relay without incurring a complicated configuration and an increase in cost.
[0008]
[Means for Solving the Problems]
In order to achieve the above object, the packet relay apparatus according to the present invention generates a uniform random number when initializing a packet buffer for storing a packet, and assigns it to a field associated with each packet storage field of the packet buffer. The uniform random number is stored, and an arbitrary empty packet storage field is allocated at the time of packet relay. On the other hand, when the probability calculation at the time of transmission is performed, the value of the field attached to the packet storage field storing the packet is read. This is used as a random number.
[0009]
According to the present invention, the random number value is obtained by reading the random number field associated with the packet storage field that stores the packet. Therefore, a uniform random number generation function including four arithmetic operations in several steps at the time of probability calculation Is no longer necessary. Moreover, since it is not necessary to generate random numbers for each packet, it is not always necessary to use hardware as means for generating random numbers, and pseudo-random numbers generated by software can be used as uniform random numbers.
[0010]
In the packet relay apparatus according to the next invention, in the above invention, when the processing load at the time of packet relay is low, or the uniform random number is generated according to a predetermined cycle, and the uniform stored in the field associated with the packet storage field The random number is updated.
[0011]
According to the present invention, when the processing load at the time of packet relay is low, or the value of the uniform random number stored in the field associated with the packet storage field is updated according to a predetermined cycle.
[0012]
When initializing a packet buffer for storing a packet, the packet relay device according to the next invention generates a random number table having an entry associated with the packet storage field on a one-to-one basis, and uniform random numbers To store the uniform random number in an entry of the random number table and assign an arbitrary empty packet storage field at the time of packet relay, while when calculating the probability at the time of transmission, the packet storing the packet The value of the entry corresponding to the storage field is read out and used as a random number.
[0013]
According to the present invention, the random number value is obtained by reading the entry of the random number table associated with the packet storage field storing the packet according to a simple rule. There is no need to execute a uniform random number generation function including. Moreover, since it is not necessary to generate random numbers for each packet, it is not always necessary to use hardware as means for generating random numbers, and pseudo-random numbers generated by software can be used as uniform random numbers.
[0014]
The packet relay device according to the next invention is the above invention, wherein the processing load at the time of packet relay is low, or a uniform random number is generated according to a predetermined cycle, and the uniform random number stored in the entry of the random number table is updated. It is characterized by doing.
[0015]
According to the present invention, the uniform random number stored in the random number table entry is updated when the processing load at the time of packet relay is low or according to a predetermined cycle.
[0016]
In the packet relay apparatus according to the next invention, in the above invention, the packet buffer is provided with a pointer field associated with each buffer storage field, and the buffer storage field is assigned to the random number according to the value of the pointer stored in the pointer field. It is characterized in that the table entries are associated one-to-one.
[0017]
According to the present invention, since the random number value is obtained by reading the entry in the random number table indicated from the pointer field attached to the packet storage field storing the packet, the four rules of several steps are used in the probability calculation. It is not necessary to execute a uniform random number generation function including an operation. Moreover, since it is not necessary to generate random numbers for each packet, it is not always necessary to use hardware as means for generating random numbers, and pseudo-random numbers generated by software can be used as uniform random numbers.
[0018]
The packet relay apparatus according to the next invention is characterized in that, in the above invention, the value of the pointer stored in the pointer field is updated when the processing load at the time of packet relay is low or according to a predetermined cycle.
[0019]
According to the present invention, the value of the pointer stored in the pointer field is updated when the processing load at the time of packet relay is low or according to a predetermined cycle.
[0020]
DETAILED DESCRIPTION OF THE INVENTION
Exemplary embodiments of a packet relay device according to the present invention will be explained below in detail with reference to the accompanying drawings.
[0021]
Embodiment 1 FIG.
FIG. 1 is a block diagram showing a configuration example of a packet relay apparatus according to Embodiment 1 of the present invention. The packet relay apparatus exemplified here is of a storage and transfer type, and includes a packet buffer 10, a random number generation unit 20, a transmission waiting queue 30, and a relay control unit 40. The packet buffer 10 has n packet storage fields 11-1 to 11-n for reading packets at the time of packet reception and reading packets at the time of packet transmission, and is attached to each packet storage field 11-1 to 11-n. And n random number fields 12-1 to 12-n for storing random numbers. The random number generation unit 20 is a part that generates a uniform random number when the packet buffer 10 is initialized, and supplies the uniform random number to the random number fields 12-1 to 12-n of the packet buffer 10. For example, if an 8-bit memory area is used as the random number fields 12-1 to 12-n of the packet buffer 10, a uniform random number generation function that generates a value in the range of 0 to 255 with an equal probability. Can be realized by starting the function when the packet buffer 10 is initialized and storing the output values in the random number fields 12-1 to 12-n. The transmission queue 30 is a buffer for storing a transmission queue, and has m queue fields 31-1 to 31-m for each transmission route. The relay control unit 40 is a part that determines the transmission route based on the packet header information of the received packet.
[0022]
Hereinafter, the operation of the packet relay apparatus will be described. First, as described above, the packet relay device generates a uniform random number in the random number generation unit 20 according to an instruction from the relay control unit 40 when the packet buffer 10 is initialized. A process of storing in the random number fields 12-1 to 12-n is performed.
[0023]
From the state described above, when the packet relay apparatus receives a packet, the packet controller 10 allocates one of the vacant packets in the packet buffer 10, for example, the packet storage field 11-1, and receives the received packet. Store. In this case, vacant packet storage fields 11-1 to 11-n are assigned without depending on the contents of the received packet. Further, the packet relay apparatus reads and processes the packet header information of the received packet stored in the packet storage fields 11-1 to 11-n by the relay control unit 40, and determines the transmission route of the received packet. For example, the received packet stored in the packet storage field 11-1 is transferred to the corresponding queue field 31-1 of the transmission queue 30 by the relay control unit 40 and held in the queue field 31-1. Transmission processing is performed.
[0024]
Here, when an algorithm for discarding or marking a packet stochastically is applied as in the above-described RED, the packet storage field 11-1 storing the received packet is stored before being held in the transmission queue 30. It is necessary to perform probability calculation for ˜11-n.
[0025]
In this case, in the first embodiment, instead of using a random number generation function by a program or a dedicated random variable generator as in the past, a packet storage field 11 that stores a received packet as a random number required for probability calculation. Uniform random numbers in random number fields 12-1 to 12-n attached to -1 to 11-n are used. The reason why the values read from the random number fields 12-1 to 12-n can be regarded as random numbers is as follows. In other words, when a packet relay apparatus receives a packet that is normally transmitted independently by many terminals, the packet relay apparatus stores empty packet storage fields 11-1 to 11-n without depending on the contents of the received packet. Assign arbitrarily. That is, to which packet storage field 11-1 to 11-n of the packet buffer 10 the received packet is assigned can be regarded as random. Accordingly, the process of storing the uniform random numbers generated in the random number generator 20 in the random number fields 12-1 to 12-n of the packet buffer 10 only when the packet buffer 10 is initialized is performed, and then the packet storage field 11-1 Even when the values of the random number fields 12-1 to 12-n associated with .about.11-n do not change every packet, the packet buffer 10 in which they are stored for a series of packets received by the packet relay device. The values obtained by reading the random number fields 12-1 to 12-n attached to can be regarded as a random numerical sequence.
[0026]
As described above, according to the packet relay apparatus, the random number value is acquired by reading the random number fields 12-1 to 12-n attached to the packet storage fields 11-1 to 11-n storing the packets. Therefore, it is not necessary to execute a uniform random number generation function including four arithmetic operations in several steps in the probability calculation accompanying RED, and the processing load can be significantly reduced. Moreover, as a hardware configuration for generating random numbers, only the random number generator 20 is provided, and the dedicated random variable generator shown in FIG. 5, that is, the time signal generator 101 and the uniform random number generator 102 are provided. , The random number generator including a large number of configurations and mechanisms, such as the storage unit 103, the four arithmetic operations unit 104, the constant generation unit 105, and the like, is not necessary. Therefore, there is no possibility of causing a situation where the configuration of the packet relay apparatus becomes complicated or a situation where the cost increases. Incidentally, in the packet relay device, since it is not necessary to generate a random number for each packet, it is not always necessary to provide the random number generator 20 as a means for generating a random number, and a pseudo-random number generated by software Can be used as a uniform random number.
[0027]
In the first embodiment described above, the received packets stored in the packet storage fields 11-1 to 11-n of the packet buffer 10 are directly transferred to the queue fields 31-1 to 31-m of the transmission queue 30. However, the present invention can also be applied to a packet relay device in which a received packet is appropriately copied and transferred to a transmission queue via a plurality of stages of packet buffers. In this case, a random number field is attached to the packet storage field of each packet buffer, and a random number value obtained from the packet buffer that stores the packet when receiving the packet, that is, the random number field that is attached to the packet storage field of the first stage packet buffer May be copied sequentially. Alternatively, using the randomness when the packet storage field of the packet buffer at the final stage is selected, a random number field is provided only in the packet buffer at the final stage, and a random number associated with each packet storage field at the time of initialization A uniform random number may be stored in the field.
[0028]
In the first embodiment described above, a uniform random number is generated only when the packet buffer 10 is initialized. However, when the processing load of the packet relay apparatus is low or periodically, the initial value of the packet buffer 10 is set. It is also possible to generate a uniform random number by using the same method as that at the time of conversion, and store it again in the random number fields 12-1 to 12-n. When the values of the random number fields 12-1 to 12-n are updated in this way, the bias of the random number values due to the fact that the values of the random number fields 12-1 to 12-n do not change for each packet is reduced. It becomes possible to do.
[0029]
Embodiment 2. FIG.
FIG. 2 is a block diagram showing a configuration example of a packet relay apparatus according to the second embodiment of the present invention. The packet relay apparatus exemplified here is of a storage and transfer type, and includes a packet buffer 10, a random number table 50, a random number generator 20, a transmission queue 30 and a relay controller 40. The packet buffer 10 has n packet storage fields 11-1 to 11-n for storing packets when receiving packets and reading packets when transmitting packets. The random number table 50 has n entries 51-1 to 51-n, and each packet of the packet buffer 10 has a simple rule that gives a one-to-one correspondence between the entries 51-1 to 51-n. Corresponding to storage fields 11-1 to 11-n. In the second embodiment, a pair of packet storage fields 11-1 to 11-n of the packet buffer 10 and entries 51-1 to 51-n of the random number table 50 are paired in a manner as shown in FIG. 1 correspondence is given. That is, subscripts i indicating individual positions are sequentially attached to the packet storage fields 11-1 to 11-n of the packet buffer 10, and subscripts indicating individual positions are respectively assigned to the entries 51-1 to 51-n of the random number table 50. i is sequentially attached, and those having the same subscript i are associated with each other. Note that the correspondence relationship between the packet storage fields 11-1 to 11-n of the packet buffer 10 and the entries 51-1 to 51-n of the random number table 50 is not necessarily limited to this. Other rules may be used. The random number generation unit 20 is a part that generates a uniform random number when the packet buffer 10 is initialized, and supplies the uniform random number to the entries 51-1 to 51-n of the random number table 50, respectively. For example, if the entries 51-1 to 51-n of the random number table 50 have a length of 8 bits, a uniform random number generation function that generates a value in the range of 0 to 255 with an equal probability is used. This can be realized by programming and starting this function when the packet buffer 10 is initialized and storing the values output in the entries 51-1 to 51-n. The transmission queue 30 is a buffer for storing a transmission queue, and has m queue fields 31-1 to 31-m for each transmission route. The relay control unit 40 is a part that determines the transmission route based on the packet header information of the received packet.
[0030]
Hereinafter, the operation of the packet relay apparatus will be described. First, as described above, the packet relay device generates a uniform random number in the random number generation unit 20 according to an instruction from the relay control unit 40 when the packet buffer 10 is initialized, and the uniform random number is generated in the entry 51 of the random number table 50. The process of storing in −1 to 51-n is performed.
[0031]
From the state described above, when the packet relay apparatus receives a packet, the packet controller 10 allocates one of the vacant packets in the packet buffer 10, for example, the packet storage field 11-1, and receives the received packet. Store. In this case, vacant packet storage fields 11-1 to 11-n are assigned without depending on the contents of the received packet. Further, the packet relay apparatus reads and processes the packet header information of the received packet stored in the packet storage fields 11-1 to 11-n by the relay control unit 40, and determines the transmission route of the received packet. For example, the received packet stored in the packet storage field 11-1 is transferred to the corresponding queue field 31-1 of the transmission queue 30 by the relay control unit 40 and held in the queue field 31-1. Transmission processing is performed.
[0032]
Here, when an algorithm for discarding or marking a packet stochastically is applied as in the above-described RED, the packet storage field 11-1 storing the received packet is stored before being held in the transmission queue 30. It is necessary to perform probability calculation for ˜11-n.
[0033]
In this case, in the second embodiment, instead of using a random number generation function by a program or a dedicated random variable generator as before, a packet storage field 11 that stores a received packet as a random number required for probability calculation is used. Uniform random numbers of entries 51-1 to 51-n associated with −1 to 11-n with simple rules are used. The reason why the values read from the entries 51-1 to 51-n of the random number table 50 can be regarded as random numbers is the same as in the first embodiment.
[0034]
As described above, according to the packet relay apparatus, by reading the entries 51-1 to 51-n of the random number table 50 associated with the packet storage fields 11-1 to 11-n storing the packets according to a simple rule. Since the random value is acquired, it is not necessary to execute a uniform random number generation function including four arithmetic operations in several steps in the probability calculation accompanying RED, and the processing load can be significantly reduced. Moreover, as a hardware configuration for generating random numbers, only the random number generation unit 20 and the random number table 50 are provided, and a random variable generation device including a large number of configurations and mechanisms becomes unnecessary. Therefore, there is no possibility of causing a situation where the configuration of the packet relay apparatus becomes complicated or a situation where the cost increases. Incidentally, in the packet relay device, since it is not necessary to generate a random number for each packet, it is not always necessary to provide the random number generator 20 as a means for generating a random number, and a pseudo-random number generated by software Can be used as a uniform random number.
[0035]
In the second embodiment, the received packets stored in the packet storage fields 11-1 to 11-n of the packet buffer 10 are transferred as they are to the queue fields 31-1 to 31-m of the transmission queue 30. However, the present invention can also be applied to a packet relay device in which a received packet is appropriately copied and transferred to a transmission queue via a plurality of stages of packet buffers. In this case, using the randomness when the packet storage field of the packet buffer at the final stage is selected, a random number table corresponding to only the packet buffer at the final stage is provided, and the packet buffer at the final stage is initialized. Sometimes, a uniform random number may be stored in a random number table entry associated with each packet storage field.
[0036]
In the second embodiment, the uniform random number is generated only when the packet buffer 10 is initialized. However, when the processing load of the packet relay apparatus is low or periodically, the initial value of the packet buffer 10 is set. It is also possible to generate a uniform random number using a method similar to that at the time of conversion, and store it again in entries 51-1 to 51-n of the random number table 50. When the values of the random number table 50 are updated in this way, it is possible to reduce the random value bias caused by the values of the entries 51-1 to 51-n not changing for each packet.
[0037]
Embodiment 3 FIG.
FIG. 4 is a block diagram showing a configuration example of the packet relay apparatus according to the third embodiment of the present invention. The packet relay apparatus exemplified here is of a storage and transfer type, and includes a packet buffer 10, a random number table 50, a random number generator 20, a transmission queue 30 and a relay controller 40. The packet buffer 10 has n packet storage fields 11-1 to 11-n for reading packets at the time of packet reception and reading packets at the time of packet transmission, and is attached to each packet storage field 11-1 to 11-n. And n pointer fields 13-1 to 13-n for storing pointers. The random number table 50 has n entries 51-1 to 51-n. The random number generation unit 20 generates a uniform random number when the packet buffer 10 is initialized, and the uniform random number is generated in the entries 51-1 to 51-n of the random number table 50 and the pointer fields 13-1 to 13- of the packet buffer 10. This is the part given to n. The transmission queue 30 is a buffer for storing a transmission queue, and has m queue fields 31-1 to 31-m for each transmission route. The relay control unit 40 is a part that determines the transmission route based on the packet header information of the received packet.
[0038]
Hereinafter, the operation of the packet relay apparatus will be described. First, as described above, the packet relay device generates a uniform random number in the random number generation unit 20 according to an instruction from the relay control unit 40 when the packet buffer 10 is initialized, and the uniform random number is generated in the entry 51 of the random number table 50. The process of storing in −1 to 51-n is performed. Further, the packet relay device instructs the pointer fields 13-1 to 13-n of the packet buffer 10 one-to-one with the entries 51-1 to 51-n of the random number table 50 as indicated by arrows in the drawing. Stores a pointer. For these pointers, for example, the random number generator 20 generates uniform random numbers for the pointer fields 13-1 to 13-n, and the jth entries 51-1 to 51-n are obtained using the value j obtained thereby. Associate. For the next pointer fields 13-1 to 13-n, the random number generator 20 generates a uniform random number again, and the value k (≠ j) obtained thereby is used to generate the kth entries 51-1 to 51-1. 51-n is associated. In the same manner, it can be set by a random procedure. The association between the pointer fields 13-1 to 13-n by the pointers and the entries 51-1 to 51-n of the random number table 50 is not necessarily limited to the above-described procedure, and for example, the i-th pointer field 13-1 to 13-n. It is also possible to use a non-random procedure such as associating the i-th entries 51-1 to 51-n with 13-n.
[0039]
From the state described above, when receiving a packet, the packet relay apparatus allocates one of the vacant packets in the packet buffer 10 when the relay control unit 40 receives the packet, for example, packet storage fields 11-1 to 11-n. The received packet is stored in. In this case, vacant packet storage fields 11-1 to 11-n are assigned without depending on the contents of the received packet. Further, the packet relay apparatus reads and processes the packet header information of the received packet stored in the packet storage fields 11-1 to 11-n by the relay control unit 40, and determines the transmission route of the received packet. For example, the received packet stored in the packet storage field 11-1 is transferred to the corresponding queue field 31-1 of the transmission queue 30 by the relay control unit 40 and held in the queue field 31-1. Transmission processing is performed.
[0040]
Here, when an algorithm for discarding or marking a packet stochastically is applied as in the above-described RED, the packet storage field 11-1 storing the received packet is stored before being held in the transmission queue 30. It is necessary to perform probability calculation for ˜11-n.
[0041]
In this case, in the third embodiment, a random number generation function by a program and a dedicated random variable generator are not used as in the past, but a packet storage field 11 that stores a received packet as a random number required for probability calculation. The uniform random values of the entries 51-1 to 51-n of the random number table 50 indicated by the pointers from the pointer fields 13-1 to 13-n associated with -1 to 11-n are used. The reason why the values read from the entries 51-1 to 51-n of the random number table 50 can be regarded as random numbers is the same as in the first embodiment.
[0042]
As described above, according to the packet relay apparatus, the entry 51-1 in the random number table 50 indicated by the pointer fields 13-1 to 13-n attached to the packet storage fields 11-1 to 11-n storing the packets. Since the random number value is acquired by reading ~ 51-n, it is not necessary to execute a uniform random number generation function including four arithmetic operations in several steps in the probability calculation associated with RED, and the processing load is reduced. It can be significantly reduced. Moreover, as a hardware configuration for generating random numbers, only the random number generation unit 20 and the random number table 50 are provided, and a random variable generation device including a large number of configurations and mechanisms becomes unnecessary. Therefore, there is no possibility of causing a situation where the configuration of the packet relay apparatus becomes complicated or a situation where the cost increases. Incidentally, in the packet relay device, since it is not necessary to generate a random number for each packet, it is not always necessary to provide the random number generator 20 as a means for generating a random number, and a pseudo-random number generated by software Can be used as a uniform random number.
[0043]
In the third embodiment described above, the received packets stored in the packet storage fields 11-1 to 11-n of the packet buffer 10 are transferred as they are to the transmission waiting queue 30, but the received packets are copied as appropriate. However, the present invention can also be applied to a packet relay device that is transferred to a transmission queue via a plurality of stages of packet buffers. In this case, using the randomness when the packet storage field of the packet buffer that is the last stage is selected, a pointer field is provided only in the packet buffer that is the last stage, and a corresponding random number table is provided. At initialization of the packet buffer, the random number entry uniform random number associated with each packet storage field may be stored.
[0044]
In the third embodiment, the uniform random number is generated only when the packet buffer 10 is initialized. However, when the processing load of the packet relay apparatus is low or periodically, the initial value of the packet buffer 10 is set. It is also possible to generate a uniform random number using a method similar to that at the time of conversion, and store it again in entries 51-1 to 51-n of the random number table 50. When the values of the random number table 50 are updated in this way, it is possible to reduce the random value bias caused by the values of the entries 51-1 to 51-n not changing for each packet.
[0045]
Further, in the above-described third embodiment, when the processing load of the packet relay apparatus is low or periodically, entries 51-1 to 51-1 of the random number table 50 are used using a random procedure similar to that at the time of initializing the packet buffer 10. The pointers of the pointer fields 13-1 to 13-n can be stored again while maintaining a one-to-one correspondence with 51-n. When the pointers of the pointer fields 13-1 to 13-n are updated in this way, that is, between the packet storage fields 11-1 to 11-n of the packet buffer 10 and the entries 51-1 to 51-n of the random number table 50. When the association is updated, it is possible to reduce the random value bias caused by the fact that the pointers in the pointer fields 13-1 to 13-n do not change for each packet.
[0046]
【The invention's effect】
As described above, according to the present invention, since the random number value is obtained by reading the random number field associated with the packet storage field storing the packet, four steps of arithmetic operations are performed in the probability calculation. It is not necessary to execute a uniform random number generation function including the processing function, and the processing load can be significantly reduced. Moreover, since it is not necessary to generate a random number for each packet, it is not always necessary to use hardware as a means for generating a random number, and a pseudo-random number generated by software can be used as a uniform random number. There is no possibility of incurring a situation where the structure becomes complicated due to the provision of a random variable generation device including a large number of structures and mechanisms, and a situation where the cost increases.
[0047]
According to the next invention, when the processing load at the time of packet relay is low, or the value of the uniform random number stored in the field associated with the packet storage field is updated according to a predetermined cycle, it does not change for each packet. It is possible to reduce the bias of the random number value caused by.
[0048]
According to the next invention, the random number value is acquired by reading the entry of the random number table associated with the packet storage field storing the packet according to a simple rule. There is no need to execute a uniform random number generation function including computation, and the processing load can be significantly reduced. Moreover, since it is not necessary to generate a random number for each packet, it is not always necessary to use hardware as a means for generating a random number, and a pseudo-random number generated by software can be used as a uniform random number. There is no possibility of incurring a situation where the structure becomes complicated due to the provision of a random variable generation device including a large number of structures and mechanisms, and a situation where the cost increases.
[0049]
According to the next invention, when the processing load at the time of packet relay is low, or the uniform random number stored in the random number table entry is updated according to a predetermined cycle, the random number value resulting from no change for each packet Can be reduced.
[0050]
According to the next invention, the random number value is obtained by reading the specified random number table entry from the pointer field associated with the packet storage field storing the packet. There is no need to execute a uniform random number generation function including four arithmetic operations, and the processing load can be significantly reduced. Moreover, since it is not necessary to generate a random number for each packet, it is not always necessary to use hardware as a means for generating a random number, and a pseudo-random number generated by software can be used as a uniform random number. There is no possibility of incurring a situation where the structure becomes complicated due to the provision of a random variable generation device including a large number of structures and mechanisms, and a situation where the cost increases.
[0051]
According to the next invention, when the processing load at the time of packet relay is low, or the pointer value stored in the pointer field is updated according to a predetermined cycle, the pointer field pointer does not change for each packet. It is possible to reduce the bias of random number values.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration example of a packet relay device according to a first embodiment of the present invention.
FIG. 2 is a block diagram showing a configuration example of a packet relay apparatus according to a second embodiment of the present invention.
FIG. 3 is a conceptual diagram illustrating the correspondence between a packet storage field of a packet buffer and a random number table entry.
FIG. 4 is a block diagram showing a configuration example of a packet relay apparatus according to a third embodiment of the present invention.
FIG. 5 is a block diagram showing a configuration example of a random variable generator applied to a conventional packet relay device.
[Explanation of symbols]
10 packet buffer, 11-1 to 11-n packet storage field, 12-1 to 12-n random number field, 13-1 to 13-n pointer field, 20 random number generator, 30 transmission queue, 31-1 to 31 -M Queue field, 40 relay control unit, 50 random number table, 51-1 to 51-n entries.

Claims (6)

パケットを格納するためのパケットバッファを初期化する際に一様乱数を発生させて該パケットバッファの各パケット格納フィールドに付随するフィールドに前記一様乱数を格納しておき、パケット中継時においては任意の空きパケット格納フィールドを割り当てる一方、送信時の確率計算を行う場合にはパケットを格納したパケット格納フィールドに附随するフィールドの値を読み出してこれを乱数として用いることを特徴とするパケット中継装置。When a packet buffer for storing packets is initialized, a uniform random number is generated, and the uniform random number is stored in a field associated with each packet storage field of the packet buffer. A packet relay apparatus characterized in that, when a free packet storage field is assigned, a field value associated with a packet storage field storing a packet is read out and used as a random number when probability calculation at the time of transmission is performed. パケット中継時の処理負荷が低い場合、もしくは所定の周期に従って一様乱数を発生させ、前記パケット格納フィールドに付随するフィールドに格納した一様乱数を更新することを特徴とする請求項1に記載のパケット中継装置。2. The uniform random number stored in a field associated with the packet storage field is updated when a processing load at the time of packet relay is low or when a uniform random number is generated according to a predetermined cycle. Packet relay device. パケットを格納するためのパケットバッファを初期化する際に、パケット格納フィールドと1対1に対応付けられたエントリを有する乱数テーブルを生成するとともに、一様乱数を発生させて該乱数テーブルのエントリに前記一様乱数を格納しておき、パケット中継時においては任意の空きパケット格納フィールドを割り当てる一方、送信時の確率計算を行う場合にはパケットを格納したパケット格納フィールドに対応するエントリの値を読み出してこれを乱数として用いることを特徴とするパケット中継装置。When a packet buffer for storing a packet is initialized, a random number table having an entry associated with the packet storage field in a one-to-one correspondence is generated, and a uniform random number is generated to generate an entry in the random number table. The uniform random number is stored, and an arbitrary empty packet storage field is allocated at the time of packet relay. On the other hand, when the probability calculation at the time of transmission is performed, the value of the entry corresponding to the packet storage field storing the packet is read. A packet relay device characterized by using this as a random number. パケット中継時の処理負荷が低い場合、もしくは所定の周期に従って一様乱数を発生させ、前記乱数テーブルのエントリに格納した一様乱数を更新することを特徴とする請求項3に記載のパケット中継装置。4. The packet relay apparatus according to claim 3, wherein a uniform random number is generated according to a predetermined cycle when a processing load during packet relay is low, or the uniform random number stored in an entry of the random number table is updated. . 前記パケットバッファに、各バッファ格納フィールドに付随するポインタフィールドを設けるとともに、該ポインタフィールドに格納したポインタの値に従って前記バッファ格納フィールドを前記乱数テーブルのエントリに1対1に対応付けたことを特徴とする請求項3または4に記載のパケット中継装置。The packet buffer is provided with a pointer field associated with each buffer storage field, and the buffer storage field is associated one-to-one with the random number table entry according to the value of the pointer stored in the pointer field. The packet relay device according to claim 3 or 4. パケット中継時の処理負荷が低い場合、もしくは所定の周期に従って前記ポインタフィールドに格納したポインタの値を更新することを特徴とする請求項5に記載のパケット中継装置。6. The packet relay device according to claim 5, wherein the value of the pointer stored in the pointer field is updated when a processing load at the time of packet relay is low or according to a predetermined cycle.
JP2001161320A 2001-05-29 2001-05-29 Packet relay device Expired - Fee Related JP3662859B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001161320A JP3662859B2 (en) 2001-05-29 2001-05-29 Packet relay device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001161320A JP3662859B2 (en) 2001-05-29 2001-05-29 Packet relay device

Publications (2)

Publication Number Publication Date
JP2002354026A JP2002354026A (en) 2002-12-06
JP3662859B2 true JP3662859B2 (en) 2005-06-22

Family

ID=19004618

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001161320A Expired - Fee Related JP3662859B2 (en) 2001-05-29 2001-05-29 Packet relay device

Country Status (1)

Country Link
JP (1) JP3662859B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100443556B1 (en) * 2001-11-30 2004-08-09 주식회사 네오텍리서치 Line Circuit For Minimizing Uncertainty Of Signal Transfer

Also Published As

Publication number Publication date
JP2002354026A (en) 2002-12-06

Similar Documents

Publication Publication Date Title
JP3532037B2 (en) Parallel computer
US6553031B1 (en) Communication node apparatus with routing tables in cache memories
JP4154213B2 (en) Packet processing device
WO1996034479A1 (en) Packet switching engine
SK62193A3 (en) Packet switch
US7089407B2 (en) Packet processing device processing input packet data in a packet routing device
US20010028659A1 (en) Data switching arbitration arrangements
US7174394B1 (en) Multi processor enqueue packet circuit
CN111310908A (en) Deep neural network hardware accelerator and its operation method
JP3662859B2 (en) Packet relay device
WO1999029071A1 (en) Resource sharing
US20110149985A1 (en) Data processing apparatus and method of controlling the same
US5535413A (en) System including plurality of data driven processors connected to each other
US6912566B1 (en) Memory device and method for operating the memory device
CN111832048B (en) Data packet ordering method and system based on dual-port RAM
US7076517B2 (en) Serial communication device with dynamic filter allocation
EP1279260A2 (en) Memory management with data discard
CA2241683A1 (en) Switching apparatus
US7219211B1 (en) Precompute logic for software packet processing
JPH09282287A (en) Communication processing system
JP2000299686A (en) Scheduling device
US7032049B2 (en) Apparatus for relaying received interrupt requests
US6807594B1 (en) Randomized arbiters for eliminating congestion
US7161908B2 (en) Deterministic bandwidth throttling to facilitate operation of a control unit
JPH10341240A (en) Exchange equipment

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050304

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: 20050322

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050324

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20080401

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20090401

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100401

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100401

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110401

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120401

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120401

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130401

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130401

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20140401

Year of fee payment: 9

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees