JP2009164911A - Buffering device - Google Patents
Buffering device Download PDFInfo
- Publication number
- JP2009164911A JP2009164911A JP2008000786A JP2008000786A JP2009164911A JP 2009164911 A JP2009164911 A JP 2009164911A JP 2008000786 A JP2008000786 A JP 2008000786A JP 2008000786 A JP2008000786 A JP 2008000786A JP 2009164911 A JP2009164911 A JP 2009164911A
- Authority
- JP
- Japan
- Prior art keywords
- data
- red
- memory
- address
- write
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
- Communication Control (AREA)
Abstract
Description
本発明は、ネットワークで通信されるデータをルータ等で一時的に保管するバッファ装置に関し、特にREDによって破棄するとマークされたデータを受信する際の処理ついて改良を行ったバッファ装置に関するものである。 The present invention relates to a buffer device that temporarily stores data communicated over a network by a router or the like, and more particularly to a buffer device that has been improved in processing for receiving data marked to be discarded by RED.
ネットワークにおけるルータでのキューの通常の動作は、ティルドロップ(tail drop)と呼ばれる方式であり、この方式では溢れたトラフィックをすべて破棄するということになる。しかしながら、この方式では、あるトラフィックに対して公平性を保てないことがあり、再送の衝突を引き起こす原因となる。そこで、RED(Random Early Detection )という方式がLinaxカーネル等で提供されている(非特許文献1参照)。 The normal operation of queues at routers in the network is a method called tail drop, which means that all overflow traffic is discarded. However, with this method, fairness may not be maintained for certain traffic, which causes a retransmission collision. Therefore, a method called RED (Random Early Detection) is provided by the Linux kernel or the like (see Non-Patent Document 1).
REDは、キューがハードリミットに達する前に、フローからランダムに選択されたトラフィックを制限する方式である。この方式によって混雑している接続をより穏やかに減速させることができ、再送の衝突を防ぐことができる。
しかしながら、上記REDでは、キューがリミットに達する前にデータを破棄するために、本来破棄しなくても問題なく処理できたはずのデータまで破棄してしまう可能性がある。この場合、本来生じなくても良かったはずの再送要求が発生し、余分なトラフィックが生じる可能性がある。 However, in the RED, since data is discarded before the queue reaches the limit, there is a possibility that even data that should not have been originally discarded can be discarded. In this case, there is a possibility that a retransmission request that should not have occurred originally occurs and extra traffic is generated.
本発明の目的は、REDによって破棄するとマークされたデータであっても、一旦メモリに格納しておくことにより、メモリがリミットに達しなかった場合、そのデータを転送させ、再送要求が起こる頻度を低減することができるようにしたバッファ装置を提供することである。 The object of the present invention is to store the data that is marked to be discarded by RED once in the memory so that if the memory does not reach the limit, the data is transferred and the frequency of retransmission requests is generated. To provide a buffer device which can be reduced.
上記目的を達成するために、請求項1にかかる発明は、通常データを入力順に書き込むとともに書き込み順に読み出す先入れ先出しのメモリを備えたバッファ装置において、REDによって破棄するとマークされたデータを前記メモリの空き領域に書き込んで前記先入れ先出しの処理の対象とし、且つ、前記REDによって破棄するとマークされたデータを書き込んだ領域に前記通常データを書き込む必要が生じたとき、該通常データを前記REDによって破棄するとマークされたデータに上書きして書き込むことを特徴とする。
請求項2にかかる発明は、請求項1に記載のバッファ装置において、前記REDによって破棄するとマークされたデータの書き込みを、前記メモリの空き領域の大きさに応じて実施することを特徴とする。
請求項3にかかる発明は、請求項1に記載のバッファ装置において、前記メモリの充填率が定常的に所定値を越えているときは、前記REDによって破棄するとマークされたデータの書き込みを行わないことを特徴とする。
請求項4にかかる発明は、請求項3に記載のバッファ装置において、前記メモリの充填率を、前記メモリに書き込まれている前記通常データのみによって計算することを特徴とする。
To achieve the above object, according to the first aspect of the present invention, in a buffer device having a first-in first-out memory in which normal data is written in the order of input and read in the order of writing, the data marked to be discarded by RED is free in the memory. When it is necessary to write the normal data to the area where the data marked to be discarded by the RED is written, the normal data is marked to be discarded by the RED. It is characterized by overwriting data.
According to a second aspect of the present invention, in the buffer device according to the first aspect, writing of data marked to be discarded by the RED is performed according to the size of the free area of the memory.
According to a third aspect of the present invention, in the buffer device according to the first aspect, when the filling rate of the memory constantly exceeds a predetermined value, data marked as discarded by the RED is not written. It is characterized by that.
According to a fourth aspect of the present invention, in the buffer device according to the third aspect, the filling rate of the memory is calculated only by the normal data written in the memory.
本発明によれば、REDによって破棄するとマークされたデータであっても一旦メモリに格納される。そして、REDによって破棄するとマークされたデータがメモリに格納された後にメモリの空き容量が少なくなり、そこに通常データが送られてきたときは、その通常データでREDによって破棄するとマークされたデータが上書きされる。このため、REDによって破棄するとマークされたデータであっても、REDの機能を乱すことなく送受信できるようになり、破棄することによってネットワーク上で起こる再送要求を減らすことが可能になる。また、メモリの充填率が定常的に所定値を越えているときは、REDによって破棄するとマークされたデータの書き込みを行わないので、REDによって破棄するとマークされたデータの無駄な書き込みが防止され、消費電力の増大を抑制することが可能であり、通常のFIFOとそれほど変わらない消費電力で本発明を実装することが可能となる。 According to the present invention, even data marked to be discarded by RED is temporarily stored in the memory. Then, after the data marked to be discarded by RED is stored in the memory, the free space of the memory is reduced, and when normal data is sent there, the data marked to be discarded by RED is the normal data. Overwritten. For this reason, even data that is marked to be discarded by RED can be transmitted / received without disturbing the function of RED, and the number of retransmission requests that occur on the network can be reduced by discarding. In addition, when the filling rate of the memory constantly exceeds a predetermined value, writing of data marked when discarded by RED is not performed, and therefore, useless writing of data marked when discarded by RED is prevented. An increase in power consumption can be suppressed, and the present invention can be implemented with power consumption that is not so different from that of a normal FIFO.
本発明では、REDによって破棄するとマークされたデータ(以下、「REDデータ」と呼ぶ)をメモリ上のあるアドレスに格納するが、当該REDデータを格納したアドレスに対して、REDによって破棄するとマークされないデータ(以下、「通常データ」と呼ぶ)を格納しなければならない場合には、通常データを優先すべくREDデータに上書きし、メモリに書き込まれた順番を狂わせることなく通常データおよび上書きされなかったREDデータを読み出すことができるようにアドレスを管理する。 In the present invention, data marked to be discarded by RED (hereinafter referred to as “RED data”) is stored at a certain address on the memory. However, if the address storing the RED data is not marked by discarding by RED. When data (hereinafter referred to as “normal data”) must be stored, the normal data was overwritten on the RED data to give priority to the normal data, and the normal data and the overwritten data were not overwritten without upsetting the order of writing to the memory. Addresses are managed so that RED data can be read.
また、本発明では、REDデータを一時格納するが、メモリの充填率が定常的にある割合を保っているような状況では、REDデータを格納しても結局破棄される結果となり、そのような状況の下では回路が無駄に電力を消費するため、メモリの充填率を動的にモニタリングしながら、REDデータを格納して意味のある場合にのみ、そのREDデータを格納する。 In the present invention, the RED data is temporarily stored. However, in a situation where the filling rate of the memory is constantly maintained at a certain ratio, even if the RED data is stored, it is eventually discarded. Under the circumstances, the circuit consumes power wastefully, and the RED data is stored only when it is meaningful to store the RED data while dynamically monitoring the filling rate of the memory.
また、本発明では、メモリの充填率は通常データが使用している領域によってのみ計算されるようにし、REDデータによって使用されている領域は使用されていないものとみなす。 In the present invention, the filling rate of the memory is calculated only by the area used by the normal data, and the area used by the RED data is regarded as not used.
本発明は、FIFOを元にしたものであり、通常データはアドレスの先頭から順番に書き込み、書き込んだ順番で読み出す。REDデータは、メモリの空いている領域に書き込む。そのメモリマップを図1に示した。 The present invention is based on the FIFO, and normal data is written in order from the beginning of the address, and is read in the order of writing. The RED data is written in an empty area of the memory. The memory map is shown in FIG.
図2に本発明の実施例のバッファ装置の構成を示す。本実施例のバッファ装置は、受信コントローラ10、送信コントローラ20、アドレス管理部30、FIFOからなるメモリ40、メモリ40の充填率のモニタを行うモニタ部50からなる。
FIG. 2 shows the configuration of the buffer device according to the embodiment of the present invention. The buffer device according to the present embodiment includes a
受信コントローラ10は、入力されたデータがREDデータか通常データかのチェックを行う。また、データパケットのヘッダからパケットサイズを特定して、バースト長(データサイズ)を計算し、その結果をアドレス管理部30に伝える。さらに、モニタ部50からメモリ40の残りの空きサイズを受け、入力されるデータのサイズがその空きサイズを超えた場合には、通常データ、REDデータに拘わらず、そのデータの受信を拒否する。モニタ部50がメモリ40の充填率が定常的(所定時間以上)に高い(例えば、50%越え)と判断した場合には、REDデータは破棄される。
The
送信コントローラ20は、アドレス管理部30によって指定されたメモリ40のアドレスのデータを受け、そのデータから、これから読み出すデータのサイズを特定しバースト長を計算し、その値をアドレス管理部30に返し、読み出すアドレスを生成させる。
The
アドレス管理部30は、受信用のアドレスと送信用のアドレスを管理する。このアドレス管理が本実施例の肝心な点である。すなわち、受信コントローラ10、送信コントローラ20から、REDが有効かどうかの情報を受け取って、その情報を元にメモリ40に渡すアドレスを生成する。アドレスの管理の詳しい方法は後に述べる。
The
メモリ40には、書き込み側のポートと読み出し側のポートが個別に用意されているメモリを使用する。つまり、書き込みと読出しが同時アクセス可能なメモリ(FIFO)である。
As the
モニタ部50は、アドレス管理部30から現在の書き込みアドレスと読み出しアドレスを受け、その情報を元にメモリ40の残りの容量を計算し、その情報を受信コントローラ10に渡す。また、メモリ40の充填率の変化を監視し、定常的に充填率が高い場合は受信コントローラ10にその情報を渡し、REDデータを格納するかどうかを判断する手助けをする。
The
本実施例のバッファ装置は、以上の構成要素を実装することによって実現可能である。次にアドレス管理の方法について述べる。図3にアドレス管理部30の構成を示す。31は受信用アドレスを管理する受信アドレス管理部、32は送信用アドレスを管理する送信アドレス管理部である。33はFIFOからなるアドレスメモリであり、メモリ40にREDデータを格納したアドレスと通常データを格納したアドレスとを格納する。例えば、図1において、メモリ40での通常データの書き込みアドレス(write_ptr)が図の位置のときに、REDデータD6が書き込まれた場合、アドレスメモリ33にその書き込みアドレス(write_ptr)の値とREDデータD6を書き込んだメモリ領域のアドレス(red_write_ptr)とを格納する。
The buffer device of the present embodiment can be realized by mounting the above components. Next, the address management method will be described. FIG. 3 shows the configuration of the
図3において、(rx_en)はデータ受信可のときアサートされる受信イネーブル信号、(red_en)は受信データがREDデータのときアサートされるREDイネーブル信号、(rx_burst_cnt)は受信データのバースト長である。また、(tx_en)はデータ送信可のときアサートされる送信イネーブル信号、(tx_burst_cnt)は送信データのバースト長である。また、(rx_address)は受信アドレス(後記する(write_ptr)や(red_write_ptr)相当)、(tx_address)は送信アドレス(後記する(read_ptr)相当)である。 In FIG. 3, (rx_en) is a reception enable signal asserted when data reception is possible, (red_en) is a RED enable signal asserted when reception data is RED data, and (rx_burst_cnt) is a burst length of reception data. Further, (tx_en) is a transmission enable signal asserted when data transmission is possible, and (tx_burst_cnt) is a burst length of transmission data. Further, (rx_address) is a reception address (equivalent to (write_ptr) and (red_write_ptr) described later), and (tx_address) is a transmission address (equivalent to (read_ptr) described later).
受信時の受信アドレス管理部31の動作を図4のメモリ40の説明図と、図5のフローチャートで説明する。受信アドレス管理部31において、REDイネーブル信号(red_en)がアサートされていなければ(S1−NO)、受信データは通常データであり、これを書き込むためのアドレス(write_ptr)を生成する。このアドレスは、初期値(0x0)からインクリメントすることにより実現する。
The operation of the reception
受信した通常データのサイズがメモリ40の空き容量より小さく(S2)、かつアドレスメモリ33が空でないとき(S3−NO)、つまりREDデータが書き込まれているときは、アドレスメモリ33に格納されているRED書き込みアドレス(red_write_ptr)の値をチェックし(S4)、このRED書き込みアドレス(red_write_ptr)の値が前記生成された書き込みアドレス(write_ptr)の値と一致した場合(S5−YES)は、アドレスメモリ33の読み出しアドレス(read_ptr)を更新した上で、通常データをメモリ40の書き込みアドレス(write_ptr)に書き込む(S6)。このとき、一致したRED書き込みアドレス(red_write_ptr)のREDデータは上書きされ破棄される。一致しない場合(S5−NO)は通常データをメモリ40の通常領域に書き込む(S7)。なお、受信した通常データのサイズがメモリ40の空き容量より大きい場合(S2−NO)は、その通常データを破棄する(S8)。また、アドレスメモリ33が空のとき(S3−YES)は、そのまま書き込みアドレス(write_ptr)に通常データを書き込む(S7)。
When the size of the received normal data is smaller than the free capacity of the memory 40 (S2) and the
一方、REDイネーブル信号(red_en)がアサートされている場合(S1−YES)は、受信データはREDデータである。まず、送信アドレス管理部32からそのときの読み出しアドレス(read_ptr)を参照し、この値を元に、REDデータ格納用のメモリ領域を確保するために、REDデータが格納されている現在のRED先頭アドレス(red_top_adr)を計算する(S9)。次に、計算されたRED先頭アドレス(red_top_adr)の値と、受信したREDデータを格納するためのRED書き込みアドレス(red_write_ptr)の値を比較して、計算されたRED先頭アドレス(red_top_adr)の値が大きければ(S10−YES)、この値をRED書き込みアドレス(red_write_ptr)に採用し(S11)、小さければRED書き込みアドレス(red_write_ptr)はそのまま(S12)として、それを採用する。
On the other hand, when the RED enable signal (red_en) is asserted (S1-YES), the received data is RED data. First, the read address (read_ptr) at that time is referred to from the transmission
次に、RED書き込みアドレス(red_write_ptr)の値と読み出しアドレス(read_ptr)の値からREDデータを格納するためのメモリ40の空き領域を計算し(S13)、メモリ40の空き容量がREDデータのサイズより大きいとき(S14−NO)、REDデータをRED書き込みアドレス(red_write_ptr)に書き込む(S15)。このとき、実際に採用されたRED書き込みアドレス(red_write_ptr)と、その時の通常データ用の書き込みアドレス(write_ptr)を、アドレスメモリ33に格納する。なお、メモリ40の空き容量がREDデータのサイズより小さいとき(S14−YES)は、REDデータを破棄する(S16)。
Next, a free area of the
送信時の動作を図6のフローチャートで説明する。アドレスメモリ33が空であれば(S21−YES)、つまり、REDデータが格納されていなければ、メモリ40の読み出しアドレス(read_ptr)から順番にデータを読み出し送信する(S22)。
The operation during transmission will be described with reference to the flowchart of FIG. If the
一方、アドレスメモリ33空でない時(S21−NO)、つまり、REDデータが格納されているときは、アドレスメモリ33に格納されているデータのうち、REDデータを書き込んだときの、通常データを格納するアドレスを示す(write_tpr)の値をチェックし(S23)、そのアドレス(rwite_ptr)の値と、現在の読み出しアドレス(read_ptr)の値を比較して一致しなければ(S24−NO)、現在の読み出しアドレス(read_ptr)の示すアドレスから通常データを読み出し送信する(S25)。一致した場合(S24−YES)は、アドレスメモリ33に格納したRED書き込みアドレス(red_write_ptr)が示すアドレスからREDデータを読み出し送信する(S26)。このときは、アドレスメモリ33の読み出しアドレス(read_ptr)を更新する。
On the other hand, when the
このようなアドレス管理を行うことで、REDデータを保持しながら、書き込まれた順番通りにデータ読み出すことができる。ところで、メモリ40の充填率が定常的に50%を超えているような場合、REDデータを一旦格納したとしても、そのREDデータは読み出されることなく受信した通常データによって上書きされる。したがって、このような状況でREDデータを格納するための機能を有効にしておくことは電力の浪費を招くため、この機能を停止させる機能を持たせる。それを実現するのがモニタ部50のブロックである。
By performing such address management, data can be read out in the order in which they are written while holding RED data. By the way, when the filling rate of the
モニタ部50は、アドレスメモリ33から通常データの書き込みアドレス(write_ptr)と読み出しアドレス(read_ptr)の値を受けて、この値を元にメモリ40の充填率を計算する。また、図4のRED先頭アドレス(red_top_adr)が更新されると、REDデータが利用可能なメモリ領域の容量をフルにセットし、書き込まれるたびに充填率をモニタリングする。この領域の残りの容量が書き込まれるREDデータのサイズより小さい場合には、書き込まないようにする。メモリ40の充填率をモニタリングし、その充填率が常に高い値(例えば、50%越え)をとっているような場合には、受信コントローラ10にその状態を伝え、REDデータを受け付けないようにする。
The
しかし、莫大なデータがバーストで受信される場合、一時的にメモリ40の充填率が増加することが考えられる。この場合、一時的に充填率が増加するため、REDシステムは破棄するデータにマークを行う。しかし、そのバーストがREDデータを含めてもフルにはならないという状況であれば、上記の機能を動作させることは有効である。したがって、モニタリングしながら、過渡的にメモリ40の充填率が増加した場合は、上記の機能を動作させる。その後、しばらく経ってもメモリ40の充填率が減少しない場合には上記の機能を停止させる。
However, when a huge amount of data is received in a burst, it is considered that the filling rate of the
10:受信コントローラ
20:送信コントローラ
30:アドレス管理部、31:受信アドレス管理部、32:送信アドレス管理部、33:アドレスメモリ
40:メモリ
50:モニタ部
10: Reception controller 20: Transmission controller 30: Address management unit 31: Reception address management unit 32: Transmission address management unit 33: Address memory 40: Memory 50: Monitor unit
Claims (4)
REDによって破棄するとマークされたデータを前記メモリの空き領域に書き込んで前記先入れ先出しの処理の対象とし、且つ、前記REDによって破棄するとマークされたデータを書き込んだ領域に前記通常データを書き込む必要が生じたとき、該通常データを前記REDによって破棄するとマークされたデータに上書きして書き込むことを特徴とするバッファ装置。 In a buffer device equipped with a first-in first-out memory for writing normal data in the order of input and reading in the order of writing,
It becomes necessary to write the data marked to be discarded by RED into an empty area of the memory for the first-in first-out processing, and to write the normal data to the area where the data marked to be discarded by RED is written. When the normal data is discarded by the RED, the marked data is overwritten and written.
前記REDによって破棄するとマークされたデータの書き込みを、前記メモリの空き領域の大きさに応じて実施することを特徴とするバッファ装置。 The buffer device according to claim 1,
A buffer device, wherein writing of data marked to be discarded by the RED is performed according to a size of an empty area of the memory.
前記メモリの充填率が定常的に所定値を越えているときは、前記REDによって破棄するとマークされたデータの書き込みを行わないことを特徴とするバッファ装置。 The buffer device according to claim 1,
When the filling rate of the memory constantly exceeds a predetermined value, data marked as discarded by the RED is not written.
前記メモリの充填率を、前記メモリに書き込まれている前記通常データのみによって計算することを特徴とするバッファ装置。
The buffer device according to claim 3, wherein
The buffer device characterized in that the filling rate of the memory is calculated only by the normal data written in the memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008000786A JP2009164911A (en) | 2008-01-07 | 2008-01-07 | Buffering device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008000786A JP2009164911A (en) | 2008-01-07 | 2008-01-07 | Buffering device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009164911A true JP2009164911A (en) | 2009-07-23 |
Family
ID=40966989
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008000786A Withdrawn JP2009164911A (en) | 2008-01-07 | 2008-01-07 | Buffering device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009164911A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017047657A1 (en) * | 2015-09-14 | 2017-03-23 | 株式会社デンソー | Buffer control apparatus, communication node, and relay apparatus |
-
2008
- 2008-01-07 JP JP2008000786A patent/JP2009164911A/en not_active Withdrawn
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017047657A1 (en) * | 2015-09-14 | 2017-03-23 | 株式会社デンソー | Buffer control apparatus, communication node, and relay apparatus |
JP2017059874A (en) * | 2015-09-14 | 2017-03-23 | 株式会社デンソー | Buffer control device, communication node, and relay device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7260104B2 (en) | Deferred queuing in a buffered switch | |
US8248945B1 (en) | System and method for Ethernet per priority pause packet flow control buffering | |
US7742408B2 (en) | System and method for filtering packets in a switching environment | |
US10601713B1 (en) | Methods and network device for performing cut-through | |
US20150215226A1 (en) | Device and Method for Packet Processing with Memories Having Different Latencies | |
EP4175232A1 (en) | Congestion control method and device | |
JP2009540681A (en) | Apparatus and method for data communication flow control | |
US20170187587A1 (en) | Technologies for inline network traffic performance tracing | |
US10419355B2 (en) | Flow control of network device | |
US9838500B1 (en) | Network device and method for packet processing | |
US8990422B1 (en) | TCP segmentation offload (TSO) using a hybrid approach of manipulating memory pointers and actual packet data | |
US8213448B2 (en) | Method to support lossless real time data sampling and processing on rapid I/O end-point | |
US9336162B1 (en) | System and method for pre-fetching data based on a FIFO queue of packet messages reaching a first capacity threshold | |
JP5233360B2 (en) | MEMORY CONTROL DEVICE, MEMORY CONTROL DEVICE CONTROL METHOD, AND INFORMATION PROCESSING DEVICE | |
EP1351439A1 (en) | Embedded system for broadcast traffic congestion control in communication network | |
EP4195615A1 (en) | Network processor with external memory protection | |
JP2009164911A (en) | Buffering device | |
US9906468B2 (en) | Packet traffic control in a network processor | |
WO2022174444A1 (en) | Data stream transmission method and apparatus, and network device | |
US9736069B1 (en) | Method for storing and retrieving packets in high bandwidth and low latency packet processing devices | |
JP2005210606A (en) | Communication device for performing priority control of packets, priority control method and program | |
US20030223447A1 (en) | Method and system to synchronize a multi-level memory | |
JP6127872B2 (en) | Arithmetic processing device and control method of arithmetic processing device | |
US20080228823A1 (en) | Frame transfer apparatus | |
JP4406011B2 (en) | Electronic circuit with processing units connected via a communication network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20110405 |