JPH04237238A - Reception buffer management system - Google Patents

Reception buffer management system

Info

Publication number
JPH04237238A
JPH04237238A JP532191A JP532191A JPH04237238A JP H04237238 A JPH04237238 A JP H04237238A JP 532191 A JP532191 A JP 532191A JP 532191 A JP532191 A JP 532191A JP H04237238 A JPH04237238 A JP H04237238A
Authority
JP
Japan
Prior art keywords
buffer
size
received
free
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.)
Granted
Application number
JP532191A
Other languages
Japanese (ja)
Other versions
JP3112958B2 (en
Inventor
Takahiro Murono
室野 隆博
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP03005321A priority Critical patent/JP3112958B2/en
Publication of JPH04237238A publication Critical patent/JPH04237238A/en
Application granted granted Critical
Publication of JP3112958B2 publication Critical patent/JP3112958B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To efficiently utilize a memory area of a reception buffer and to simply segment a desired field part of a reception data stored in the reception buffer. CONSTITUTION:Rows of idle buffers (11-1-11-3) whose size is (a) designated by an idle buffer descriptor 21 and rows of idle buffers (12-1-12-4) whose size is (b) designated by an idle buffer descriptor 22 are prepared. At the reception of a data packet of a size L, in the case of a>=L>b, a head buffer 11-1 of the row of the idle buffer of the size (a) is removed from the relevant buffer row and in the case of b>=L, a head buffer 12-1 of the row of the idle buffer of the size (b) is removed from the relevant buffer row. Then a reception data is stored in the removed buffer from the buffer row and the buffer is linked to the end of the received buffer row.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】この発明は、DMA機能を持つ通
信コントローラなど、受信データを格納するための受信
バッファを備えた装置に用いて好適な受信バッファ管理
方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a receive buffer management system suitable for use in devices equipped with a receive buffer for storing received data, such as a communication controller with a DMA function.

【0002】0002

【従来の技術】DMA機能を持つLANコントローラな
どの通信コントローラには、一般に、受信データ(受信
パケット)を格納するための空き受信バッファの列と、
この空き受信バッファ列を指定する空きバッファディス
クリプタとが設けられている。従来、この種の通信コン
トローラでは、データを受信すると、空きバッファディ
スクリプタの指定する空き受信バッファ列の先頭バッフ
ァに受信データを格納する動作が行われる。そして、こ
のデータが格納された受信バッファは空き受信バッファ
列から、受信済みバッファディスクリプタの示す(受信
済み受信バッファの列の)チェインの最後につなぎ直さ
れる。
2. Description of the Related Art A communication controller such as a LAN controller having a DMA function generally includes a row of empty reception buffers for storing received data (received packets).
An empty buffer descriptor for specifying this empty reception buffer row is provided. Conventionally, in this type of communication controller, when data is received, an operation is performed in which the received data is stored in the first buffer of a series of free reception buffers specified by a free buffer descriptor. Then, the receive buffer storing this data is reconnected from the empty receive buffer column to the end of the chain (of the received receive buffer column) indicated by the received buffer descriptor.

【0003】さて、空き受信バッファのサイズは、受信
データ(受信パケット)を確実に格納できるように、受
信し得るデータの最大長に一致させるのが一般的である
。しかし、空き受信バッファのサイズを受信パケットの
最大長とするには、バッファ用のメモリ領域として大き
な領域が必要となる問題があった。しかも、通信手順用
の小さいパケットが授受されることが多い通常の状態で
は、そのメモリ領域の大部分が使用されず、無駄になっ
ていた。
[0003] Generally, the size of the free reception buffer is made to match the maximum length of data that can be received so that the received data (received packets) can be reliably stored. However, in order to set the size of the free reception buffer to the maximum length of the reception packet, there is a problem in that a large area is required as a memory area for the buffer. Moreover, under normal conditions in which small packets for communication procedures are often exchanged, most of the memory area is not used and is wasted.

【0004】そこで、メモリ領域の有効利用を図るため
に、小さいサイズの空き受信バッファを多数チェインし
ておき、必要なだけのバッファをチェインからはずして
使用する方式も考えられている。しかし、この方式では
、複数の受信バッファに分散して格納された受信パケッ
トの中のあるフィールドのデータだけを取出そう(切出
そう)とする場合には、受信パケットの先頭データが格
納されている受信バッファ(受信済みバッファ)を検出
した後、そのバッファにつながっているバッファ列をた
どって、目的のフィールドデータが格納されているバッ
ファを検出しなけれはならず、必要なフィールドデータ
の切出しが高速に行えないという問題があった。
[0004] Therefore, in order to effectively utilize the memory area, a method has been considered in which a large number of small-sized free reception buffers are chained together, and as many buffers as necessary are removed from the chain and used. However, with this method, when attempting to extract (cut out) only data from a certain field in a received packet that is distributed and stored in multiple receive buffers, the first data of the received packet is not stored. After detecting the receive buffer (received buffer) that is currently in use, the buffer string connected to that buffer must be traced to find the buffer that stores the desired field data, and the necessary field data can be extracted. There was a problem that it could not be done at high speed.

【0005】[0005]

【発明が解決しようとする課題】上記したように従来は
、受信バッファに格納された受信データから任意のフィ
ールドデータが簡単に切出せるようにするには、その受
信データを1つの受信バッファに全て格納できるように
、受信バッファのサイズを受信データの最大長にしてお
く必要があった。しかし、このような従来のバッファ管
理方式では、通常は通信手順用の小さいパケットが授受
されることが多いため、受信バッファの大部分の領域が
使用されずに無駄になり、しかもバッファ用のメモリ領
域としても大領域が必要となる問題があった。
[Problems to be Solved by the Invention] As mentioned above, conventionally, in order to easily extract arbitrary field data from the received data stored in the receive buffer, it is necessary to store all the received data in one receive buffer. It was necessary to set the size of the receive buffer to the maximum length of the received data so that it could be stored. However, in such conventional buffer management methods, small packets for communication procedures are often exchanged, so most of the area in the receive buffer is not used and is wasted, and the memory for the buffer is also wasted. There was also the problem that a large area was required.

【0006】この発明は上記事情に鑑みてなされたもの
でその目的は、受信バッファ用のメモリ領域が無駄無く
効率的に利用でき、しかも受信バッファに格納された受
信データ中の所望のフィールドのデータが簡単に切出せ
る受信バッファ管理方式を提供することにある。
The present invention has been made in view of the above-mentioned circumstances, and an object of the present invention is to enable efficient use of the memory area for the receive buffer without wasting it, and to enable data in a desired field in the received data stored in the receive buffer to be used efficiently. An object of the present invention is to provide a reception buffer management method that allows for easy extraction of data.

【0007】[0007]

【課題を解決するための手段】この発明は、一定サイズ
の空き受信バッファの列を複数サイズ分設けるとともに
、各空き受信バッファ列をそれぞれ指定する複数の空き
バッファディスクリプタと、データ受信時に、その受信
データのサイズをもとにデータ格納に最適な空き受信バ
ッファのサイズを上記複数サイズの中から選択するサイ
ズ選択手段とを設け、このサイズ選択手段によって選択
されたサイズに対応する空きバッファディスクリプタの
指定する空き受信バッファ列の先頭バッファに受信デー
タを格納するようにしたことを特徴とするものである。
[Means for Solving the Problems] The present invention provides a plurality of rows of free receive buffers of a fixed size, a plurality of free buffer descriptors that designate each row of free receive buffers, and a method for receiving the received buffers at the time of data reception. size selection means for selecting the size of the free reception buffer most suitable for data storage from among the plurality of sizes based on the size of the data, and specifying the free buffer descriptor corresponding to the size selected by the size selection means. The present invention is characterized in that received data is stored in the first buffer of a series of free reception buffers.

【0008】[0008]

【作用】上記の構成において、受信データ(例えば受信
パケット)のバッファリングに際して、その受信データ
を無駄無く且つ確実に格納できる受信バッファのサイズ
が、その受信データのサイズをもとに、複数のバッファ
列のそれぞれのバッファのサイズの中から選択される。 ここでは、受信データサイズ以上のものの中で受信デー
タサイズに最も近いバッファサイズが、最適サイズとし
て選択される。最適サイズが選択されると、そのサイズ
に固有の空きバッファディスクリプタの指定する空き受
信バッファ列の先頭バッファに受信データが格納される
。このとき、受信データが格納されたバッファは、空き
受信バッファ列から受信済み受信バッファ列のチェイン
の最後につなぎ換えられる。
[Operation] In the above configuration, when buffering received data (for example, received packets), the size of the receive buffer that can store the received data reliably and without waste is determined based on the size of the received data. The size of each buffer in the column is selected. Here, the buffer size closest to the received data size among those larger than the received data size is selected as the optimal size. When the optimum size is selected, the received data is stored in the first buffer of the free receive buffer series specified by the free buffer descriptor specific to that size. At this time, the buffer in which the received data is stored is reconnected to the end of the chain from the empty receive buffer column to the received receive buffer column.

【0009】このように、受信データは、受信データサ
イズより大きく、且つ受信データサイズに最も近いバッ
ファサイズの空き受信バッファに選択的に格納される。 このため、受信データが格納されたバッファ内で使用さ
れていない無駄な領域は極めて少なく、しかも1バッフ
ァ内に確実に格納されるので、所望のフィールドのデー
タをバッファから切出すのも簡単に行える。
[0009] In this manner, received data is selectively stored in an empty receive buffer whose buffer size is larger than the received data size and which is closest to the received data size. Therefore, there is very little wasted space that is not being used within the buffer in which received data is stored, and since it is reliably stored within one buffer, it is easy to extract data of a desired field from the buffer. .

【0010】0010

【実施例】図1はこの発明を適用するDMA機能付き通
信コントローラの一実施例を示すバッファ部周辺のブロ
ック構成図である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a block diagram showing an embodiment of a communication controller with a DMA function to which the present invention is applied.

【0011】図1において、11−1〜11−3はサイ
ズがaの空き受信バッファ(以下、空きバッファと称す
る)、12−1〜12−4はサイズがb(ただしb<a
)の空きバッファ(空き受信バッファ)である。13−
1は受信パケットが格納されているサイズがbの受信バ
ッファ(以下、受信済みバッファと称する)である。バ
ッファ11−1〜11−3,12−1〜12−4,13
−1は、RAM等で構成されるバッファ部14に置かれ
ている。
In FIG. 1, 11-1 to 11-3 are empty receiving buffers of size a (hereinafter referred to as empty buffers), and 12-1 to 12-4 are of size b (however, b<a
) is an empty buffer (empty receive buffer). 13-
Reference numeral 1 denotes a receive buffer (hereinafter referred to as a received buffer) having a size b in which received packets are stored. Buffers 11-1 to 11-3, 12-1 to 12-4, 13
-1 is placed in the buffer unit 14, which is composed of a RAM or the like.

【0012】図1では、空きバッファ11−1〜11−
3は、空きバッファ11−1を先頭バッファとし、空き
バッファ11−3を最終バッファとするサイズa用の空
きバッファ列(空きバッファチェイン)を構成している
。また空きバッファ12−1〜12−4は、空きバッフ
ァ12−1を先頭バッファとし、空きバッファ12−4
を最終バッファとするサイズb用の空きバッファ列(空
きバッファチェイン)を構成している。
In FIG. 1, free buffers 11-1 to 11-
3 constitutes an empty buffer string (empty buffer chain) for size a in which the empty buffer 11-1 is the first buffer and the empty buffer 11-3 is the last buffer. In addition, the free buffers 12-1 to 12-4 have the free buffer 12-1 as the first buffer, and the free buffer 12-4 as the first buffer.
A free buffer string (empty buffer chain) for size b is configured with the final buffer being .

【0013】各バッファ11−1〜11−3,12−1
〜12−4,13−1の先頭領域は、そのバッファサイ
ズと、同バッファに受信パケットが格納された場合のそ
のパケットのサイズとを設定するためのヘッダ部Hとし
て用いられる。また、各バッファ11−1〜11−3,
12−1〜12−4,13−1の最終領域は、該当する
バッファ列(空きバッファ列、または受信済みバッファ
列)における自バッファの次のバッファを指定する次ポ
インタを設定するための次ポインタ部NPとして用いら
れる。なお、上記のサイズa,bは、ヘッダ部Hおよび
次ポインタ部NPを除くバッファ領域(実際に受信パケ
ットが格納可能な領域)のサイズを示す。
[0013] Each buffer 11-1 to 11-3, 12-1
The leading areas of ~12-4 and 13-1 are used as a header section H for setting the buffer size and the size of the received packet when it is stored in the same buffer. In addition, each buffer 11-1 to 11-3,
The final areas 12-1 to 12-4 and 13-1 are next pointers for setting the next pointer that specifies the next buffer after the own buffer in the corresponding buffer column (empty buffer column or received buffer column). Used as part NP. Note that the above sizes a and b indicate the size of the buffer area (area that can actually store received packets) excluding the header part H and next pointer part NP.

【0014】次ポインタ部NPには、その内容(次ポイ
ンタ)が無効であり、次のバッファが存在しないことを
示すためのエンドフラグEFが付加される。図1では、
空きバッファ11−3、12−4および受信済みバッフ
ァ13−1の各ヘッダ部HのエンドフラグEFがオンさ
れている。このフラグオンの状態を斜線で示す。
An end flag EF is added to the next pointer section NP to indicate that its contents (next pointer) are invalid and that the next buffer does not exist. In Figure 1,
The end flag EF of each header section H of the empty buffers 11-3, 12-4 and the received buffer 13-1 is turned on. This flag-on state is indicated by diagonal lines.

【0015】21はサイズa用の空きバッファ列を指定
するための空きバッファディスクリプタ、22はサイズ
b用の空きバッファ列を指定するための空きバッファデ
ィスクリプタである。23は受信済みバッファ列を指定
するための受信済みバッファディスクリプタである。各
ディスクリプタ21〜23には、対応するバッファ列(
ここでは、1つのバッファしか存在しない場合にも、バ
ッファ列と呼ぶ)の先頭バッファを指すポインタ(先頭
ポインタ)SPが設定される。この先頭ポインタSPに
は、同ポインタSPが有効であること(即ち、バッファ
列が存在すること)を示す有効フラグVが付加される。
Reference numeral 21 denotes a free buffer descriptor for specifying a free buffer column for size a, and 22 a free buffer descriptor for specifying a free buffer column for size b. 23 is a received buffer descriptor for specifying a received buffer sequence. Each descriptor 21 to 23 has a corresponding buffer column (
Here, even if only one buffer exists, a pointer (start pointer) SP pointing to the first buffer of a buffer sequence (referred to as a buffer sequence) is set. A valid flag V indicating that the pointer SP is valid (that is, that a buffer string exists) is added to this head pointer SP.

【0016】次に、図1に示す状態で、パケットを受信
した場合の受信パケット格納処理について、図2のフロ
ーチャートを参照して説明する。まず通信コントローラ
は、回線からデータパケットを受信すると、その受信パ
ケットのサイズLと、空きバッファディスクリプタ21
,22で指定される空きバッファ列を構成するバッファ
のサイズa,bとをもとに、このサイズa,b(用の空
きバッファ列)の中から受信パケットサイズLに最適な
ものを選択する(ステップS1)。具体的には、サイズ
a,bから受信パケットサイズL以上のバッファサイズ
(即ち、受信パケットが全て格納可能なバッファサイズ
)のものを選び、更にその中から、受信パケットサイズ
Lに最も近いものを最適サイズとして選択する。
Next, the received packet storage process when a packet is received in the state shown in FIG. 1 will be explained with reference to the flowchart shown in FIG. First, when the communication controller receives a data packet from the line, it records the size L of the received packet and the free buffer descriptor 21.
, 22, select the one that is most suitable for the received packet size L from among the sizes a and b (empty buffer rows). (Step S1). Specifically, from sizes a and b, select one with a buffer size equal to or larger than the received packet size L (that is, a buffer size that can store all received packets), and then select the one closest to the received packet size L from among them. Select as the optimal size.

【0017】したがって、受信パケットのサイズLが例
えばa≧L>bであるならば、通信コントローラはバッ
ファサイズaを選択する。次に通信コントローラは、選
択したバッファサイズaに固有の空きバッファディスク
リプタ21を参照し、サイズa用の空きバッファ列の先
頭の空きバッファ(図1では空きバッファ11−1)を
指定する先頭ポインタSPを得る(ステップS2)。こ
れに対し、受信パケットのサイズLがb≧Lであるなら
ば、通信コントローラはバッファサイズbを選択して空
きバッファディスクリプタ22を参照し、サイズb用の
空きバッファ列の先頭の空きバッファ(図1では空きバ
ッファ12−1)を指定する先頭ポインタSPを得る。
Therefore, if the size L of the received packet is, for example, a≧L>b, the communication controller selects the buffer size a. Next, the communication controller refers to the free buffer descriptor 21 specific to the selected buffer size a, and selects a start pointer SP that specifies the first free buffer (free buffer 11-1 in FIG. 1) of the free buffer string for size a. (Step S2). On the other hand, if the size L of the received packet is b≧L, the communication controller selects buffer size b, refers to the free buffer descriptor 22, and selects the free buffer at the head of the free buffer string for size b (see Fig. 1, a head pointer SP that specifies an empty buffer 12-1) is obtained.

【0018】通信コントローラは、空きバッファディス
クリプタ(21または22)から先頭ポインタSPを得
ると、そのポインタSPの指定する先頭空きバッファを
該当する空きバッファ列(空きバッファチェイン)から
はずし、空きバッファディスクリプタを更新する(ステ
ップS3)。具体的には、空きバッファディスクリプタ
21から先頭ポインタSPを得た(a≧L>bの)場合
であれば、同ポインタSPの内容を、同ポインタSPの
指定する先頭空きバッファ11−1(図1参照)の次ポ
インタ部NPの内容(図1の例では次の空きバッファ1
1−2を指定する次ポインタ)に更新する。この結果、
空きバッファ11−1はサイズa用の空きバッファ列か
らはずされ、図3に示すように、次の空きバッファ11
−2がこの空きバッファ列の先頭となる。同様に、空き
バッファディスクリプタ22からポインタSPを得た(
b≧Lの)場合であれば、同ポインタSPの指定する先
頭空きバッファ12−1がサイズb用の空きバッファ列
からはずされ、図4に示すように、次の空きバッファ1
2−2がこの空きバッファ列の先頭となる。
[0018] When the communication controller obtains the start pointer SP from the free buffer descriptor (21 or 22), it removes the start free buffer specified by the pointer SP from the corresponding free buffer string (free buffer chain) and replaces the free buffer descriptor. Update (step S3). Specifically, if the start pointer SP is obtained from the free buffer descriptor 21 (a≧L>b), the contents of the pointer SP are transferred to the start free buffer 11-1 (Fig. 1)) contents of the next pointer part NP (in the example of Fig. 1, the next free buffer 1)
The next pointer that specifies 1-2) is updated. As a result,
Free buffer 11-1 is removed from the free buffer column for size a, and as shown in FIG.
-2 becomes the head of this empty buffer sequence. Similarly, pointer SP was obtained from free buffer descriptor 22 (
b≧L), the first free buffer 12-1 specified by the pointer SP is removed from the free buffer string for size b, and the next free buffer 1 is moved as shown in FIG.
2-2 becomes the head of this empty buffer sequence.

【0019】次に通信コントローラは、空きバッファ列
からはずしたバッファに受信パケットを格納する(ステ
ップS4)。これにより、受信パケットのサイズLがa
≧L>bの場合であれば、その受信パケットはサイズa
の空きバッファ11−1に格納され、b≧Lの場合であ
れば、サイズbの空きバッファ12−1に格納される。
Next, the communication controller stores the received packet in a buffer removed from the free buffer array (step S4). As a result, the size L of the received packet is a
If ≧L>b, the received packet has size a
If b≧L, the data is stored in the free buffer 12-1 of size b.

【0020】通信コントローラはステップS4を終了す
ると、受信パケットが格納されたバッファ(即ち、空き
バッファから受信済みバッファとなったバッファ)を受
信済みバッファディスクリプタ23の指定する受信済み
バッファ列(受信済みバッファチェイン)の最後につな
ぎ(ステップS5)、受信パケット格納処理を終了する
When the communication controller finishes step S4, the communication controller converts the buffer in which the received packet is stored (that is, the buffer that has changed from an empty buffer to a received buffer) into the received buffer string (received buffer) specified by the received buffer descriptor 23. At the end of the chain (step S5), the received packet storage process ends.

【0021】これにより、サイズa用の空きバッファ列
から空きバッファ11−1をはずして同バッファ11−
1に受信パケットを格納した(a≧L>bの)場合であ
れば、同バッファ11−1が図3に示すように受信済み
バッファ13−2となって、受信済みバッファ列の最後
、即ち受信済みバッファ13−1の後につながれる。同
様に、サイズb用の空きバッファ列から空きバッファ1
2−1をはずして同バッファ12−1に受信パケットを
格納した(b≧Lの)場合であれば、同バッファ12−
1が図4に示すように受信済みバッファ13−2となっ
て、受信済みバッファ13−1につながれる。
[0021] As a result, the free buffer 11-1 is removed from the free buffer column for size a, and the free buffer 11-1 is
If the received packet is stored in buffer 13-1 (a≧L>b), the same buffer 11-1 becomes the received buffer 13-2 as shown in FIG. It is connected after the received buffer 13-1. Similarly, from the free buffer column for size b, free buffer 1 is
2-1 is removed and the received packet is stored in the same buffer 12-1 (b≧L), the same buffer 12-1 is stored.
1 becomes a received buffer 13-2 as shown in FIG. 4, and is connected to the received buffer 13-1.

【0022】以上は、受信済みバッファ13−1の次ポ
インタ部NPに受信済みバッファ13−2(a≧L>b
の場合であれば図1に示すバッファ11−1であり、b
≧Lの場合であれば図1に示すバッファ12−1である
)を指定するポインタを設定すると共にこの次ポインタ
部NPに付されているエンドフラグEFをオフし、更に
受信済みバッファ13−2の次ポインタ部NPに付され
ているエンドフラグEFをオンすることにより実現され
る。
[0022] In the above, the next pointer part NP of the received buffer 13-1 is set to the received buffer 13-2 (a≧L>b
In this case, it is the buffer 11-1 shown in FIG. 1, and b
If ≧L, it sets a pointer that specifies the buffer 12-1 shown in FIG. This is realized by turning on the end flag EF attached to the next pointer section NP.

【0023】なお、前記実施例では、バッファサイズが
a,bの2種の場合、即ち空きバッファディスクリプタ
の数が2つの場合について説明したが、これに限るもの
ではない。例えば、3種以上のバッファサイズ、即ち3
つ以上の空きバッファディスクリプタを適用して、空き
バッファのサイズを更に細分化すれば、バッファのメモ
リ領域をより効率的に使用することが可能となる。
[0023] In the above embodiment, the case where there are two types of buffer sizes a and b, that is, the number of free buffer descriptors is two, has been described, but the present invention is not limited to this. For example, 3 or more buffer sizes, i.e. 3
By applying more than one free buffer descriptor to further subdivide the size of the free buffer, it becomes possible to use the memory area of the buffer more efficiently.

【0024】また、前記実施例では、通信コントローラ
における受信バッファ管理に実施した場合について説明
したが、本発明は可変長のデータを一時格納するための
受信バッファを持つ装置における受信バッファ管理全般
に適用可能である。
Further, in the above embodiment, the case where the reception buffer management is implemented in a communication controller has been explained, but the present invention can be applied to reception buffer management in general in a device having a reception buffer for temporarily storing variable length data. It is possible.

【0025】[0025]

【発明の効果】以上詳述したようにこの発明によれば、
一定サイズの空き受信バッファの列を複数サイズ分設け
、データ受信時には、その受信データを、受信データサ
イズより大きく、且つ受信データサイズに最も近いバッ
ファサイズの空き受信バッファに選択的に格納する構成
としたので、受信データが格納されたバッファ(受信済
みバッファ)内で使用されていない無駄な領域を極めて
少なくすることができるようになり、受信バッファ用の
メモリ領域を効率的に使用できる。
[Effects of the Invention] As detailed above, according to the present invention,
A plurality of rows of empty reception buffers of a fixed size are provided, and when data is received, the received data is selectively stored in an empty reception buffer whose buffer size is larger than the reception data size and closest to the reception data size. Therefore, it becomes possible to extremely reduce the amount of unused and wasted area in the buffer in which received data is stored (received buffer), and the memory area for the reception buffer can be used efficiently.

【0026】また、この発明によれば、受信バッファの
領域を効率的に利用しながら、受信データを1バッファ
内に確実に格納することができるため、バッファから所
望のフィールドのデータを切出すことが、複数のバッフ
ァに分割して格納する方式に比べて極めて簡単に行える
Furthermore, according to the present invention, it is possible to reliably store received data in one buffer while efficiently utilizing the area of the receive buffer, so that data of a desired field can be extracted from the buffer. However, this is much simpler than the method of dividing and storing data in multiple buffers.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】この発明を適用するDMA機能付き通信コント
ローラの一実施例を示すバッファ部周辺のブロック構成
図。
FIG. 1 is a block configuration diagram around a buffer section showing an embodiment of a communication controller with a DMA function to which the present invention is applied.

【図2】上記通信コントローラにおける受信パケット格
納処理の手順を説明するためのフローチャート。
FIG. 2 is a flowchart for explaining the procedure of received packet storage processing in the communication controller.

【図3】図1の状態でa≧L>bとなるサイズLのパケ
ットを受信した場合の、受信パケット格納後の状態を示
す図。
FIG. 3 is a diagram showing a state after storing a received packet when a packet of size L where a≧L>b is received in the state of FIG. 1;

【図4】図1の状態でb≧LとなるサイズLのパケット
を受信した場合の、受信パケット格納後の状態を示す図
FIG. 4 is a diagram showing a state after storing a received packet when a packet of size L, where b≧L, is received in the state of FIG. 1;

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

11−1〜11−3…(サイズaの)空きバッファ(空
き受信バッファ)、12−1〜12−4…(サイズbの
)空きバッファ(空き受信バッファ)、13−1,13
−2…受信済みバッファ、14…バッファ部、21,2
2…空きバッファディスクリプタ、23…受信済みバッ
ファディスクリプタ。
11-1 to 11-3... (size a) empty buffer (empty reception buffer), 12-1 to 12-4... (size b) empty buffer (empty reception buffer), 13-1, 13
-2...Received buffer, 14...Buffer part, 21,2
2...Free buffer descriptor, 23...Received buffer descriptor.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  一定サイズの空き受信バッファの列を
複数サイズ分設けるとともに、上記各空き受信バッファ
列をそれぞれ指定する複数の空きバッファディスクリプ
タと、データ受信時に、その受信データのサイズをもと
にデータ格納に最適な空き受信バッファのサイズを上記
複数サイズの中から選択するサイズ選択手段とを設け、
このサイズ選択手段によって選択されたサイズに対応す
る上記空きバッファディスクリプタの指定する空き受信
バッファ列の先頭バッファに上記受信データを格納する
ようにしたことを特徴とする受信バッファ管理方式。
Claim 1: A plurality of rows of free receive buffers of a fixed size are provided, and a plurality of free buffer descriptors specifying each of the rows of free receive buffers, and when data is received, a plurality of free buffer descriptors are provided, and when data is received, a plurality of free receive buffer rows of a fixed size are provided. size selection means for selecting the size of the free reception buffer most suitable for data storage from among the plurality of sizes;
A reception buffer management system characterized in that the received data is stored in the first buffer of a series of free reception buffers designated by the free buffer descriptor corresponding to the size selected by the size selection means.
JP03005321A 1991-01-21 1991-01-21 Receive buffer management method Expired - Fee Related JP3112958B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP03005321A JP3112958B2 (en) 1991-01-21 1991-01-21 Receive buffer management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03005321A JP3112958B2 (en) 1991-01-21 1991-01-21 Receive buffer management method

Publications (2)

Publication Number Publication Date
JPH04237238A true JPH04237238A (en) 1992-08-25
JP3112958B2 JP3112958B2 (en) 2000-11-27

Family

ID=11607992

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03005321A Expired - Fee Related JP3112958B2 (en) 1991-01-21 1991-01-21 Receive buffer management method

Country Status (1)

Country Link
JP (1) JP3112958B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07202946A (en) * 1993-12-21 1995-08-04 Internatl Business Mach Corp <Ibm> System and method to manage communication buffer
JP2009532954A (en) * 2006-03-31 2009-09-10 クゥアルコム・インコーポレイテッド Memory management for high-speed media access control
JP2010268321A (en) * 2009-05-15 2010-11-25 Fujitsu Ltd Transmitter and transmission method
JP2016071768A (en) * 2014-10-01 2016-05-09 富士通株式会社 Storage control device and storage system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07202946A (en) * 1993-12-21 1995-08-04 Internatl Business Mach Corp <Ibm> System and method to manage communication buffer
US6181705B1 (en) 1993-12-21 2001-01-30 International Business Machines Corporation System and method for management a communications buffer
JP2009532954A (en) * 2006-03-31 2009-09-10 クゥアルコム・インコーポレイテッド Memory management for high-speed media access control
US8139593B2 (en) 2006-03-31 2012-03-20 Qualcomm Incorporated Memory management for high speed media access control
US8594112B2 (en) 2006-03-31 2013-11-26 Qualcomm Incorporated Memory management for high speed media access control
JP2010268321A (en) * 2009-05-15 2010-11-25 Fujitsu Ltd Transmitter and transmission method
JP2016071768A (en) * 2014-10-01 2016-05-09 富士通株式会社 Storage control device and storage system

Also Published As

Publication number Publication date
JP3112958B2 (en) 2000-11-27

Similar Documents

Publication Publication Date Title
JP3336816B2 (en) Multimedia communication device and method
US4916692A (en) TDM bus controller
EP0725351A2 (en) Expedited message transfer in a multi-nodal data processing system
CN102104548B (en) Method and device for receiving and processing data packets
JPH086844A (en) Memory system, content address memory system, scheduling system, and fetch method
JPS62297952A (en) Storage system for variable length data
US20030200367A1 (en) Network switch having descriptor cache and method thereof
US6101546A (en) Method and system for providing data files that are partitioned by delivery time and data type
US5146560A (en) Apparatus for processing bit streams
JPH04237238A (en) Reception buffer management system
US7216185B2 (en) Buffering apparatus and buffering method
JP3198547B2 (en) Buffer management method for receiving device
JPH05191441A (en) System for processing synchronized time-division signal like non-synchronized time-division data packet
US6684271B1 (en) Method and apparatus for changing context in link channelization
JPS6391766A (en) Control system for accessing memory device
JP3230339B2 (en) Communication control device
US8170024B2 (en) Implementing pointer and stake model for frame alteration code in a network processor
CA1312957C (en) Apparatus for processing bit streams
CN105610814B (en) Reduce the method and system of message Forwarding Latency
JP3752809B2 (en) Digital television receiving method and digital television receiving terminal device
JP4938946B2 (en) Method and apparatus for transferring data at high speed between different types of devices
JP2747097B2 (en) LAN connection device
CN117707775A (en) Quotation data transmission method, device, equipment and storage medium
JPH05307566A (en) Parallel processing type contents retrieval device
JP2001060970A (en) Address retrieving device

Legal Events

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

Free format text: PAYMENT UNTIL: 20070922

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20080922

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20080922

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090922

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20090922

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20100922

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees