JP4228296B2 - Variable length packet storage apparatus and method - Google Patents

Variable length packet storage apparatus and method Download PDF

Info

Publication number
JP4228296B2
JP4228296B2 JP2003419090A JP2003419090A JP4228296B2 JP 4228296 B2 JP4228296 B2 JP 4228296B2 JP 2003419090 A JP2003419090 A JP 2003419090A JP 2003419090 A JP2003419090 A JP 2003419090A JP 4228296 B2 JP4228296 B2 JP 4228296B2
Authority
JP
Japan
Prior art keywords
length
packet
buffer area
variable
buffer
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
JP2003419090A
Other languages
Japanese (ja)
Other versions
JP2005184179A (en
Inventor
勝巳 今村
栄二 榊原
秀行 工藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2003419090A priority Critical patent/JP4228296B2/en
Publication of JP2005184179A publication Critical patent/JP2005184179A/en
Application granted granted Critical
Publication of JP4228296B2 publication Critical patent/JP4228296B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Description

本発明は可変長パケット蓄積装置及び方法に関し、特に、インターネットやLAN(Local Area Network)のネットワークの中継装置やパケットスイッチ等において、可変長データのパケットを一時的に蓄積するバッファリング共有メモリの使用効率向上を図った可変長パケット蓄積装置及び方法に関する。   The present invention relates to a variable-length packet storage apparatus and method, and more particularly to the use of a buffering shared memory that temporarily stores variable-length data packets in a relay device or a packet switch of the Internet or a LAN (Local Area Network) network. The present invention relates to a variable-length packet storage apparatus and method for improving efficiency.

近年、インターネットの利用の普及に伴い、ネットワークにおけるパケット中継の高速処理及び中継品質の向上が求められている。パケットスイッチやパケット中継装置等は、受信したパケットをバッファリング共有メモリ(RAM等)に一旦蓄積し、該パケットのヘッダ部の宛て先アドレスを基に送信先を決定し、蓄積された各パケットを順次バッファリング共有メモリから読み出して送信する。   In recent years, with the widespread use of the Internet, high-speed packet relay processing and improvement of relay quality in the network are required. The packet switch, packet relay device, etc. temporarily store the received packet in a buffering shared memory (RAM, etc.), determine the destination based on the destination address in the header of the packet, and store each stored packet Sequentially read from the buffering shared memory and transmit.

このようなパケット蓄積装置において、受信パケットをバッファリング共有メモリへ蓄積する際、受信パケットを固定長に分割して格納する。また、バッファリング共有メモリも固定長のバッファ領域に区切っておき、受信パケットを該固定長のバッファ領域に格納していく。このとき、1つの受信パケットを連続する固定長のバッファ領域に格納する必要はなく、不連続の未使用(空き状態)のバッファ領域を順次使用して格納する。   In such a packet accumulating device, when accumulating received packets in the buffering shared memory, the received packets are divided into fixed lengths and stored. The buffering shared memory is also divided into fixed-length buffer areas, and received packets are stored in the fixed-length buffer areas. At this time, it is not necessary to store one received packet in a continuous fixed-length buffer area, but sequentially use and store discontinuous unused (empty) buffer areas.

受信パケットの到来順にバッファリング共有メモリに連続的に格納しても、バッファリング共有メモリから読み出すパケットの順序は、必ずしも受信パケットの到来順ではないため、バッファリング共有メモリには未使用(空き状態)のバッファ領域が不連続的にまばらに散在することになる。従って、不連続の未使用(空き状態)のバッファ領域をリンクさせて使用することにより、バッファリング共有メモリを効率良く使用することができる。このバッファリング共有メモリの蓄積方式は、リンクリストによるメモリ管理方式として一般に知られている。   Even if the packets are stored sequentially in the buffering shared memory in the order of arrival of the received packets, the order of packets read from the buffering shared memory is not necessarily the order of arrival of the received packets. ) Buffer areas are scattered discontinuously and sparsely. Therefore, the buffering shared memory can be used efficiently by linking and using discontinuous unused (empty) buffer areas. This buffering shared memory storage method is generally known as a memory management method using a linked list.

従来のバッファリング共有メモリへの蓄積の管理方式について図9を参照して説明する。図9はサイズSバイトのバッファリング共有メモリを、mバイトの固定長のバッファ領域に分割して受信パケットを格納した例を示している。同図において、パケットAのパケット長がバッファサイズmバイトより1バイト大きいために、パケットAの格納領域はバッファ領域9−1及び9−2の2つのバッファ領域を使用する。この場合、バッファ領域9−2は1バイトのデータの格納だけで残りの分は不使用領域となってしまう。このような状態では使用効率が約50%になってしまう。   A conventional management method for storing data in a buffering shared memory will be described with reference to FIG. FIG. 9 shows an example in which a received packet is stored by dividing a buffering shared memory of size S bytes into buffer areas of a fixed length of m bytes. In the figure, since the packet length of the packet A is one byte larger than the buffer size m bytes, the storage area of the packet A uses two buffer areas 9-1 and 9-2. In this case, the buffer area 9-2 stores only 1 byte of data, and the remaining area becomes an unused area. In such a state, the usage efficiency is about 50%.

なお、同図において、共有メモリの斜線を施したバッファ領域はパケットデータが格納され使用中の状態であることを示し、空白のバッファ領域は未使用(空き状態)であることを示している。因みに、図9のパケットBのようにパケット長がバッファサイズmより僅かに小さい場合、或いはパケット長が{バッファサイズm×j(jは2以上の任意の整数)−1バイト}の場合であれば、バッファリング共有メモリの使用効率は100%近くになる。   In the figure, the hatched buffer area of the shared memory indicates that the packet data is stored and in use, and the blank buffer area indicates that it is unused (empty). Incidentally, if the packet length is slightly smaller than the buffer size m as in the packet B of FIG. 9, or the packet length is {buffer size m × j (j is an arbitrary integer greater than or equal to 2) −1 byte}. For example, the usage efficiency of the buffering shared memory is close to 100%.

しかし、固定長のバッファサイズmを小さくすれば、使用効率は限りなく100%に近づくが、バッファサイズmを小さくするに伴い、パケットを格納するバッファ領域の連結を管理するポインタ(連結するバッファ領域の共有メモリ中の先頭アドレスを示すもの)の数が増加するため、該ポインタを記憶するメモリに大容量のものを必要とし、ハードウェア規模の増大につながる。   However, if the fixed-size buffer size m is reduced, the usage efficiency approaches as much as 100%. However, as the buffer size m is reduced, pointers for managing the connection of buffer areas for storing packets (buffer areas to be connected) The number of the first address in the shared memory) increases, the memory for storing the pointer requires a large capacity, leading to an increase in hardware scale.

バッファリング共有メモリの使用効率を向上させるための方式として、幾つかのサイズの異なる固定長のバッファ領域を準備しておき、パケットを受信した際に、そのパケット長を計測し(計測期間中はバッファリング共有メモリ以外の一時格納メモリに1パケットを保持)、該パケット長に応じ、無駄な不使用領域が最も少なくなる固定長バッファ領域を選択して格納することにより、前述の問題解決を図る技術が下記の特許文献1及び2等に記載されている。   As a method for improving the use efficiency of the buffering shared memory, several fixed-size buffer areas of different sizes are prepared, and when the packet is received, the packet length is measured (during the measurement period) One packet is held in a temporary storage memory other than the buffering shared memory), and a fixed-length buffer area that minimizes a wasteful unused area is selected and stored according to the packet length, thereby solving the above-described problem. The technology is described in Patent Documents 1 and 2 below.

下記の特許文献1は、可変長のパケットを格納する際のメモリ空間の連続性を保証し、同時にメモリ空間の無駄遣いを防止するパケットメモリ監視装置に関するもので、また、下記の特許文献2は、異なるサイズの領域から成る複数の一時記憶領域と端末識別番号による参照フラグを使用して記憶領域の有効利用を図るパケット蓄積型データ交換処理装置に関するものである。
特開2002−185505号公報 特開2001−77851号公報
The following Patent Document 1 relates to a packet memory monitoring device that guarantees continuity of a memory space when storing a variable-length packet and at the same time prevents waste of the memory space. The present invention relates to a packet storage type data exchange processing device that uses a plurality of temporary storage areas composed of areas of different sizes and a reference flag based on a terminal identification number to effectively use the storage area.
JP 2002-185505 A JP 2001-77851 A

しかしながら、前述の従来の技術のものは、事前に受信パケット長を想定してバッファサイズを予め決定し、該サイズにバッファリング共有メモリを区切っておく必要がある。しかし、ネットワークを流れる多数のパケットのサイズの想定を正確に行うことは不可能であり、パケットのサイズの想定が正確に為されない場合、想定したサイズより大きいパケットを受信できない、或いは想定したサイズよりもかなり小さいパケットしか受信されない場合には、バッファ領域内に不使用領域が多く発生し、共有メモリの使用効率が低下するという問題が発生する。   However, in the above-described conventional technique, it is necessary to determine the buffer size in advance by assuming the length of the received packet and delimit the buffering shared memory to the size. However, it is impossible to accurately estimate the size of a large number of packets flowing through the network, and if the packet size is not correctly estimated, packets larger than the expected size cannot be received, or the estimated size However, when only a very small packet is received, a lot of unused areas are generated in the buffer area, which causes a problem that the use efficiency of the shared memory is lowered.

また、最近のネットワークを流れるパケットには、ジャンボパケット(9Kバイト前後)も多く発生するようになり、このジャンボパケットをサイズ計測用の一時格納メモリに保持するには、ハードウェア規模の増大が不可欠となる。また、複数のポートが混在する伝送インタフェース(例えばSPI4P2:System Packet Interface Level4,Phase2等)を使用する場合は、混在するポートの数分の一時格納メモリが必要となり、さらにハードウェア規模が増大化してしまう。以上のように、事前に想定したパケット長と異なる受信パケットに対しては、バッファリング共有メモリが効率的に使用されないという問題があった。   In addition, jumbo packets (around 9 Kbytes) are frequently generated in packets flowing through recent networks, and in order to keep these jumbo packets in temporary storage memory for size measurement, it is essential to increase the hardware scale. It becomes. Also, when using a transmission interface in which multiple ports are mixed (for example, SPI4P2: System Packet Interface Level 4, Phase 2, etc.), temporary storage memory is required for the number of mixed ports, which further increases the hardware scale. End up. As described above, there is a problem that the buffering shared memory is not efficiently used for a received packet having a packet length different from that assumed in advance.

本発明は、ネットワークを流れるパケットのサイズに左右されることなく、バッファリング共有メモリを効率よく使用することができ、また、パケットを格納するバッファ領域の空き塞がり及びその連結を管理するポインタの数の増大を抑制することができる可変長パケット蓄積装置及び方法を提供することを目的とする。   The present invention can use the buffering shared memory efficiently without being influenced by the size of the packet flowing through the network, and the number of pointers for managing the blockage of the buffer area for storing the packet and its connection An object of the present invention is to provide a variable-length packet accumulating apparatus and method capable of suppressing the increase of the packet.

本発明の可変長パケット蓄積装置は、(1)入力される可変長受信パケットの長さについての受信頻度の統計データを算定する受信パケット長監視手段と、可変長受信パケットを格納するサイズの異なる複数種類のバッファ領域から構成されるバッファリング共有メモリと、該バッファリング共有メモリにおけるサイズの異なる複数種類のバッファ領域の構成比率を、前記受信パケット長監視手段から得た可変長受信パケットの長さについての受信頻度の統計データを基に変更する手段と、を備えたものである。   The variable length packet accumulating device of the present invention is different from (1) a reception packet length monitoring means for calculating reception frequency statistical data for the length of an input variable length reception packet and a size for storing a variable length reception packet. The length of the variable-length received packet obtained from the received packet length monitoring means by comparing the configuration ratio of the buffering shared memory composed of a plurality of types of buffer areas and the plurality of types of buffer areas having different sizes in the buffering shared memory. And a means for changing based on the statistical data of the reception frequency for.

また、(2)前記受信パケット長監視手段は、入力される可変長受信パケットの長さが所定の閾値以上か否かを判定して可変長受信パケットを大小2種類の何れかに振り分ける手段を備え、前記振り分け手段により振り分けた大サイズの可変長受信パケットを大サイズのバッファ領域に格納し、小サイズの可変長受信パケットを小サイズのバッファ領域に格納する構成を有するものである。   (2) The received packet length monitoring means determines whether the length of the input variable-length received packet is equal to or greater than a predetermined threshold and distributes the variable-length received packet into one of two types, large and small. A large-sized variable-length received packet distributed by the distributing means is stored in a large-sized buffer area, and a small-sized variable-length received packet is stored in a small-sized buffer area.

また、(3)前記バッファ領域を、大サイズのバッファ領域と該大サイズのバッファ領域を複数個に分割した小サイズとのバッファ領域とから構成し、大サイズのバッファ領域の単位でその先頭アドレスのみを空きポインタとして管理する空きポインタメモリと、大サイズのバッファ領域の単位毎に各小サイズのバッファ領域の空き状態を示すサブアドレスフラグを記憶するバッファサイズ管理メモリとを備えたものである。   (3) The buffer area is composed of a large buffer area and a small buffer area obtained by dividing the large buffer area into a plurality of parts, and the start address of each large buffer area is a unit. And a buffer size management memory for storing a sub-address flag indicating the free state of each small-sized buffer area for each unit of the large-sized buffer area.

また、本発明の可変長パケット蓄積方法は、(4)入力される可変長受信パケットの長さについての受信頻度の統計データを算定する受信パケット長監視ステップと、サイズの異なる複数種類のバッファ領域で構成された受信パケット格納用のバッファリング共有メモリに対して、該サイズの異なる複数種類のバッファ領域の構成比率を、前記受信パケット長監視手段から得られる可変長受信パケットの長さについての受信頻度の統計データを基に変更するステップと、入力される可変長受信パケットの長さに応じて最も少ない不使用領域となるバッファ領域を選択して該可変長受信パケットを格納するステップとを含むものである。   The variable length packet storage method of the present invention includes (4) a reception packet length monitoring step for calculating reception frequency statistical data for the length of an input variable length reception packet, and a plurality of types of buffer areas having different sizes. For the buffered shared memory for storing received packets configured in the above, the composition ratios of a plurality of types of buffer areas having different sizes are received for the length of the variable-length received packet obtained from the received packet length monitoring means. A step of changing based on the statistical data of the frequency, and a step of selecting the buffer area that is the least unused area according to the length of the input variable-length received packet and storing the variable-length received packet. It is a waste.

また、(5)前記受信パケット長監視ステップは、入力される可変長受信パケットの長さが所定の閾値以上か否かを判定して可変長受信パケットを大小2種類の何れかに振り分けるステップを含み、前記振り分けステップにより振り分けた大サイズの可変長受信パケットを大サイズのバッファ領域に格納し、小サイズの可変長受信パケットを小サイズのバッファ領域に格納するステップを有するものである。   (5) The received packet length monitoring step includes a step of determining whether or not the length of the input variable-length received packet is equal to or greater than a predetermined threshold and allocating the variable-length received packet to one of two types, large and small. Including a step of storing a large variable-length received packet distributed in the distribution step in a large buffer area and storing a small variable-length received packet in a small buffer area.

本発明によれば、サイズの異なる複数種類の固定長バッファ領域から成るバッファリング共有メモリに、可変長パケットを分割して蓄積する際に、パケット受信時にそのパケット長の大小に関する受信頻度を算定し、該パケット長の大小に関する受信頻度の統計データを基に、バッファリング共有メモリにおけるサイズの異なる複数種類のバッファ領域の構成比率を変化させることにより、ネットワークを流れるパケットの長さに左右されることなく、バッファリング共有メモリを効率よく使用し、可変長パケット蓄積装置の性能を向上させることができる。   According to the present invention, when a variable-length packet is divided and stored in a buffering shared memory composed of a plurality of types of fixed-length buffer areas of different sizes, the reception frequency related to the size of the packet length is calculated when the packet is received. Depends on the length of the packet flowing through the network by changing the composition ratio of multiple types of buffer areas of different sizes in the buffering shared memory based on the statistical data of the reception frequency related to the size of the packet length In addition, the buffering shared memory can be used efficiently, and the performance of the variable-length packet storage device can be improved.

また、受信パケット長の大小を判定し、その判定結果に応じて受信パケットを大小2種類のサイズの何れかに振り分けることにより、該振り分けによる大サイズの受信パケットの格納に大サイズのバッファ領域を使用し、小サイズの受信パケットの格納に小サイズのバッファ領域を使用する制御が容易となり、効率的にバッファリング共有メモリを使用することが可能となる。   In addition, by determining the size of the received packet length and allocating the received packet to one of two sizes depending on the determination result, a large buffer area is provided for storing large sized received packets by the distribution. This makes it easy to control the use of a small buffer area for storing small received packets, and makes it possible to efficiently use a buffering shared memory.

また、バッファ領域を、大サイズのバッファ領域と該大サイズのバッファ領域を複数個に分割した小サイズとのバッファ領域とから構成し、大サイズのバッファ領域の単位でその先頭アドレスのみを空きポインタとして管理し、大サイズのバッファ領域の単位毎に各小サイズのバッファ領域の空き状態を示すサブアドレスフラグを用いて小サイズのバッファ領域の空き塞がりを管理することにより、バッファ領域の空き塞がり及びその連結を管理するポインタの数の増大を抑制し、ハードウェア規模の増大化を防ぐことができる。   The buffer area is composed of a large buffer area and a buffer area of a small size obtained by dividing the large buffer area into a plurality of pieces, and only the head address of the large buffer area is a free pointer. By managing sub-address flags indicating the free state of each small-sized buffer area for each unit of the large-sized buffer area, An increase in the number of pointers for managing concatenation can be suppressed, and an increase in hardware scale can be prevented.

図1は本発明によるパケット蓄積装置におけるバッファ管理部の構成を示す。該バッファ管理部は、受信パケット長監視部1−1を設け、該受信パケット長監視部1−1により、受信パケットの長さを観測し、この観測結果を使用して、ダイナミックに(動作を継続しながら)バッファリング共有メモリのバッファ領域の構成を変更するものである。   FIG. 1 shows a configuration of a buffer management unit in a packet storage apparatus according to the present invention. The buffer management unit is provided with a received packet length monitoring unit 1-1. The received packet length monitoring unit 1-1 observes the length of the received packet, and uses this observation result to dynamically (operate the operation). (Continued) This changes the configuration of the buffer area of the buffering shared memory.

バッファ領域の構成の変更とは、バッファリング共有メモリを、mバイト及びnバイト(m>n)の2種類のサイズのバッファ領域により構成し、mバイトのバッファ領域の個数とnバイトのバッファ領域の個数との比を変更することである。パケット長監視部1−1において、受信パケットの長さの統計データを採取する。この統計データの採取は、或る1つの閾値を設け、その閾値以上のパケット長の受信パケット数及びその閾値以下のパケット長の受信パケット数を、2つのカウンタを用いてカウントすることにより行う。   Changing the configuration of the buffer area means that the buffering shared memory is composed of buffer areas of two sizes of m bytes and n bytes (m> n), and the number of buffer areas of m bytes and the buffer area of n bytes It is to change the ratio with the number of. The packet length monitoring unit 1-1 collects statistical data on the length of the received packet. The statistical data is collected by setting a certain threshold value and counting the number of received packets having a packet length equal to or greater than the threshold and the number of received packets having a packet length equal to or less than the threshold using two counters.

上記2つのカウンタのカウント値を基に、閾値以上のパケット長の受信パケット数と閾値以下のパケット長の受信パケット数との比率を算出し、該比率を受信状態通知情報としてバッファサイズ振り分け部1−2に通知し、バッファサイズ振り分け部1−2は一定時間毎の受信パケットの長さの状態を認識する。   Based on the count values of the two counters, a ratio between the number of received packets having a packet length equal to or greater than the threshold and the number of received packets having a packet length equal to or less than the threshold is calculated, and the ratio is used as the reception status notification information. -2 is notified, and the buffer size distribution unit 1-2 recognizes the state of the length of the received packet at regular intervals.

バッファサイズ振り分け部1−2では、使用済み(空き状態)となったバッファ領域のポインタ(使用済みポインタ)をポインタ管理部1−6から受け取ると、この使用済みポインタのバッファ領域を次に使用する際のサイズを、前述の受信パケット長についての受信パケット数の比率を基に決定して、空ポインタ管理部1−4へ、該使用済みポインタのバッファ領域について次に使用する際のサイズを指示する。   When the buffer size distribution unit 1-2 receives a pointer (used pointer) of a used buffer area (used pointer) from the pointer management unit 1-6, the buffer area of the used pointer is used next. Is determined based on the ratio of the number of received packets with respect to the above-mentioned received packet length, and the empty pointer management unit 1-4 is instructed about the size to be used next for the buffer area of the used pointer. To do.

即ち、使用済みバッファ領域を再使用する際に、mバイト又はnバイトの2種類のバッファサイズの何れで使用するかをバッファサイズ振り分け部1−2で決定し、空ポインタ管理部1−4は、サイズが決定した使用済みバッファ領域のポインタを、2種類のバッファサイズ毎の空ポインタキューに登録して空ポインタのリンクリストを作成する。空ポインタメモリ1−5は、空き状態のバッファ領域のポインタを格納するメモリであり、空ポインタ管理部1−4内の2種類のバッファサイズ毎の空ポインタキューによって管理される。   That is, when the used buffer area is reused, the buffer size distribution unit 1-2 determines which one of two types of buffer sizes, m bytes or n bytes, is used, and the empty pointer management unit 1-4 The pointer of the used buffer area whose size is determined is registered in the empty pointer queue for each of the two types of buffer sizes to create a linked list of empty pointers. The empty pointer memory 1-5 is a memory for storing a pointer in an empty buffer area, and is managed by an empty pointer queue for each of two types of buffer sizes in the empty pointer management unit 1-4.

入力される受信パケットをバッファリング共有メモリに書き込む際は、使用するバッファ領域のサイズを受信パケット長に合わせ、そのサイズのバッファ領域の空きポインタを空ポインタ管理部1−4により空ポインタメモリ1−5から読み出し、ポインタ管理部1−6を介して該空きポインタをバッファリング共有メモリへ転送し、バッファリング共有メモリは、該空きポインタを書き込みアドレスとして用いて受信パケットを書き込む。   When writing the input received packet to the buffering shared memory, the size of the buffer area to be used is matched with the length of the received packet, and the empty pointer management unit 1-4 sets the empty pointer of the buffer area of that size to the empty pointer memory 1-. 5 and transfers the empty pointer to the buffering shared memory via the pointer management unit 1-6, and the buffering shared memory writes the received packet using the empty pointer as a write address.

図2に本発明の空きポインタ管理部の構成例を示す。空きポインタ管理部1−4は、大サイズバッファ領域用の空きポインタキュー(#0)1−41と、小サイズバッファ領域用の空きポインタキュー(#1)1−42とを備え、空きポインタキュー(#0)1−41は、大サイズバッファ領域の空き先頭ポインタTOP及び末尾ポインタENDを格納し、空きポインタキュー(#1)1−42は、小サイズバッファ領域の空き先頭ポインタTOP及び末尾ポインタENDを格納する。   FIG. 2 shows a configuration example of the empty pointer management unit of the present invention. The empty pointer manager 1-4 includes an empty pointer queue (# 0) 1-41 for a large buffer area and an empty pointer queue (# 1) 1-42 for a small size buffer area. (# 0) 1-41 stores the empty head pointer TOP and tail pointer END of the large size buffer area, and the empty pointer queue (# 1) 1-42 stores the empty head pointer TOP and tail pointer of the small size buffer area. Store END.

大サイズバッファ領域用の空きポインタキュー(#0)1−41及び小サイズバッファ領域用の空きポインタキュー(#1)1−42の先頭ポインタTOPには、それぞれ、大サイズバッファ領域用の各空きポインタ及び小サイズバッファ領域用の各空きポインタを、空きポインタメモリ1−5で順次連結(空きポインタメモリの各アドレスに次の空きポインタを格納)し、大サイズバッファ領域用及び小サイズバッファ領域用それぞれの空きポインタキューを編成する。   The free pointer queue (# 0) 1-41 for the large size buffer area and the free pointer queue (# 1) 1-42 for the small size buffer area each have a free space for the large size buffer area. Each free pointer for the pointer and the small size buffer area is sequentially concatenated in the free pointer memory 1-5 (the next free pointer is stored at each address of the free pointer memory) to be used for the large size buffer area and the small size buffer area. Organize each free pointer queue.

空きポインタ管理部1−4は、バッファサイズ振り分け部1−2から空きポインタ及びそのサイズ指示が通知されると、該空きポインタを該サイズ指示に従って、大サイズバッファ領域用又は小サイズバッファ領域用の何れか一方のバッファ領域用の空きポインタキューの末尾ポインタENDに登録する。なお、後述するが、小サイズバッファ領域用の空きポインタには、小サイズバッファ領域単位のポインタを用いず、大サイズバッファ領域単位のポインタを用いて空きポインタキューを編成する。   When the empty pointer management unit 1-4 is notified of the empty pointer and its size instruction from the buffer size distribution unit 1-2, the empty pointer management unit 1-4 uses the empty pointer for the large size buffer area or the small size buffer area according to the size instruction. It is registered in the end pointer END of the empty pointer queue for one of the buffer areas. As will be described later, a free pointer queue is organized using pointers in units of large size buffer areas instead of pointers in units of small size buffer areas as free pointers for small size buffer areas.

図3及び図4に本発明によるバッファリング共有メモリの構成変更例を示す。図3は初期値として、小サイズ(nサイズ)のバッファ領域と大サイズ(mサイズ)のバッファ領域とを同量の割合でバッファリング共有メモリを構成した例を示している。この後、受信状態通知により、大サイズ及び小サイズの受信パケットの受信比率が知らされると、図4に示す例のように、該受信比率に応じてバッファリング共有メモリの構成を変更する。   FIG. 3 and FIG. 4 show a configuration change example of the buffering shared memory according to the present invention. FIG. 3 shows an example in which the buffering shared memory is configured with the same amount of the small size (n size) buffer area and the large size (m size) buffer area as the initial values. Thereafter, when the reception ratio notification informs the reception ratio of the large and small reception packets, the configuration of the buffering shared memory is changed according to the reception ratio as shown in the example of FIG.

バッファリング共有メモリの構成変更は、小サイズのバッファ領域のメモリ数を{(m/n)×受信比率×S}とし、残りを小サイズのバッファ領域とする。ここで、mは大サイズのバッファ領域のサイズ、nは小サイズのバッファ領域のサイズ、受信比率は全受信パケット数に対するmサイズ以下の受信パケットの受信数の割合、Sはバッファリング共有メモリ全体のサイズである。
図5に本発明のバッファサイズ管理メモリの構成を示す。バッファ領域の管理に用いるポインタには大きいバッファサイズ(mバイト)のポインタのみを用い、2種類のバッファサイズの各空きポインタの管理も大きいバッファサイズ(mバイト)の単位のポインタを用いて行い、小さいバッファサイズ(nバイト)のバッファ領域の管理は、大きいバッファサイズ(mバイト)のバッファ領域にサブアドレスを定義することによって行う。つまり、バッファ領域をmバイト単位でポインタをつけて管理する。従って、管理するポインタ数は、全バッファリング共有メモリ容量Sバイト÷mバイトである。
In the configuration change of the buffering shared memory, the number of memories in the small size buffer area is set to {(m / n) × reception ratio × S}, and the rest is set to the small size buffer area. Here, m is the size of the large buffer area, n is the size of the small buffer area, the reception ratio is the ratio of the number of received packets of size m or less to the total number of received packets, and S is the entire buffering shared memory Is the size of
FIG. 5 shows the configuration of the buffer size management memory of the present invention. Only a pointer with a large buffer size (m bytes) is used as a pointer for managing the buffer area, and each empty pointer of two types of buffer sizes is also managed with a pointer in units of a large buffer size (m bytes). Management of a buffer area having a small buffer size (n bytes) is performed by defining a sub-address in a buffer area having a large buffer size (m bytes). That is, the buffer area is managed by attaching a pointer in units of m bytes. Therefore, the number of pointers to be managed is the total buffering shared memory capacity S bytes ÷ m bytes.

サブアドレスの数(k+1)は、大きいバッファサイズ(mバイト)と小さいバッファサイズ(nバイト)との比により決定される。即ち、n×(k+1)=mとなるように決定する。各サブアドレスは、ポインタの値に0からkまでのカウンタ値を加えることによって一意に決定する。   The number of subaddresses (k + 1) is determined by the ratio of the large buffer size (m bytes) to the small buffer size (n bytes). That is, it is determined so that n × (k + 1) = m. Each subaddress is uniquely determined by adding a counter value from 0 to k to the value of the pointer.

このサブアドレスの各領域を、閾値以下の短い受信パケットの格納バッファ領域として使用し、1ポインタで示される1つの大サイズバッファ領域を、連続する(k+1)個の小サイズバッファ領域として使用する。バッファ管理メモリ1−3には、サブアドレス単位に該サブアドレスの空き塞がりを示すフラグの格納領域を備える。このサブアドレスフラグはmバイトの分割数(m÷n=k+1)分のビットとなる。   Each area of this sub-address is used as a storage buffer area for short received packets that are equal to or smaller than a threshold value, and one large size buffer area indicated by one pointer is used as a continuous (k + 1) small size buffer area. The buffer management memory 1-3 is provided with a flag storage area that indicates a free blockage of the subaddress in units of subaddresses. This sub-address flag is a bit corresponding to the division number of m bytes (m ÷ n = k + 1).

該サブアドレスフラグは、mバイトサイズに定義して使用するバッファ領域については“all 1”、nバイトサイズに定義して使用するバッファ領域については“all 0”に設定する。バッファリング共有メモリに蓄積された受信パケットが、送信のためにバッファリング共有メモリから読み出されて出力された後は、該パケットが蓄積されていたバッファ領域のポインタを空ポインタ(使用済みポインタ)として空きポインタメモリ1−5に登録するが、その際、サブアドレス単位に使用済みとなったサブアドレスフラグを1ビットずつ空き状態“1”にセットし、1つの大サイズバッファ領域内の全てのサブアドレスのフラグが空き状態“all 1”にセットされた時点で、該バッファ領域のポインタを空ポインタとして設定する。こうすることにより、該使用済みのポインタを次に使用する際に、大サイズバッファ又は小サイズバッファの何れの空きポインタとしてでも使用可能になる。   The sub-address flag is set to “all 1” for the buffer area defined and used for the m-byte size, and “all 0” for the buffer area defined and used for the n-byte size. After the received packet stored in the buffering shared memory is read from the buffering shared memory for transmission and output, the pointer of the buffer area in which the packet is stored is an empty pointer (used pointer). Is registered in the empty pointer memory 1-5, but at that time, the subaddress flag that has been used for each subaddress is set to the empty state "1" bit by bit, and all the subaddresses in one large size buffer area are set. When the flag is set to the empty state “all 1”, the pointer of the buffer area is set as an empty pointer. In this way, the used pointer can be used as an empty pointer in either the large size buffer or the small size buffer when the used pointer is used next time.

なお、小サイズバッファの空きポインタキューの登録されたポインタは、該ポインタのバッファ領域の一部のサブアドレスにパケットが格納され、一部のサブアドレスが未使用(空き状態)であるときは、該ポインタを空きポインタキューに繋いだままにしておき、該ポインタのバッファ領域の全てのサブアドレスにパケットが格納されたときに、使用中(塞がり)状態として空きポインタキューから外す。そして、小サイズのバッファ領域に受信パケットを格納する際に、空きポインタのバッファ領域のサブアドレスフラグを参照し、該フラグが空き状態(“1”)を示す先頭のサブアドレスから順に受信パケットを格納し、格納し終えたサブアドレスのフラグを使用中状態(“0”)に設定する。   The pointer registered in the empty pointer queue of the small size buffer is stored when a packet is stored in a part of the subaddress of the buffer area of the pointer and the part of the subaddress is unused (empty state). Are connected to the empty pointer queue, and when the packet is stored in all the sub-addresses of the buffer area of the pointer, it is removed from the empty pointer queue as being in use (blocked). When the received packet is stored in the small buffer area, the subaddress flag in the buffer area of the empty pointer is referred to, and the received packet is stored in order from the first subaddress indicating the empty state (“1”). Then, the flag of the sub address that has been stored is set to the in-use state (“0”).

図6にバッファリング共有メモリにおける小サイズ(nバイト)バッファ領域の割当て例を示す。同図において、斜線部の領域が小サイズ(nバイト)バッファ領域であることを示し、小サイズ(nバイト)バッファ領域は、mバイト単位毎にバッファリング共有メモリ内の任意の領域に割当てることができる。   FIG. 6 shows an example of allocation of a small size (n bytes) buffer area in the buffering shared memory. In the figure, the shaded area indicates a small size (n byte) buffer area, and the small size (n byte) buffer area is allocated to an arbitrary area in the buffering shared memory in units of m bytes. Can do.

このように、サブアドレス単位にサブアドレスフラグを実装し、該サブアドレスフラグを用いて小サイズのバッファ領域の空き状態を識別することにより、サブアドレス単位でポインタ管理する必要がなく、大きいバッファサイズ単位でポインタ管理すればよいので、空ポインタ管理のメモリは少容量のものでよくハードウェア規模の増大を防ぐことができ、nバイト以下のパケットであれば(m/n)個分のパケットをmサイズのバッファ領域に格納でき、mサイズ以下のパケットをバッファリング共有メモリに効率よく格納することができる。   In this way, by implementing a sub-address flag in units of sub-addresses and using the sub-address flag to identify the empty state of a small-sized buffer area, pointer management is not necessary in units of sub-addresses, and pointer management is performed in units of large buffer sizes. Therefore, the empty pointer management memory can be small in size and can prevent an increase in hardware scale, and if it is a packet of n bytes or less, (m / n) packets are m-sized buffers. Packets that can be stored in the area and are not larger than m size can be efficiently stored in the buffering shared memory.

図7は本発明によるパケットスイッチの構成例を示す。パケットスイッチは、パケットの受信ポートを実装する受信部(#0,#1)7−1と、複数の受信ポートからのパケットを一つの出力ポートに多重化し、且つ、一時格納メモリを実装する多重化(MUX)受信バッファ7−2と、受信パケットを格納するバッファリング共有メモリ7−5と、バッファリング共有メモリ7−5の管理を行うバッファ管理部7−3と、受信パケットのヘッダ情報を基に宛先の決定及びトラフィック制御を行うルーティング処理部7−4と、バッファリング共有メモリ7−5から読み出したパケットを各出力ポートに分離する分離部7−6と、分離(DMUX)部7−6から出力されるパケットを送信ポートのフォーマットへ変換する処理を行う送信部7−7とから構成される。   FIG. 7 shows a configuration example of a packet switch according to the present invention. The packet switch multiplexes a receiving unit (# 0, # 1) 7-1 that implements a packet receiving port, a packet from a plurality of receiving ports into one output port, and a temporary storage memory. (MUX) receive buffer 7-2, buffering shared memory 7-5 for storing received packets, buffer management unit 7-3 for managing buffering shared memory 7-5, and header information of received packets. A routing processing unit 7-4 that performs destination determination and traffic control based on the packet, a separation unit 7-6 that separates packets read from the buffering shared memory 7-5 into output ports, and a separation (DMUX) unit 7- 6 includes a transmission unit 7-7 that performs processing for converting a packet output from the transmission port 6 into a transmission port format.

受信パケットをバッファリング共有メモリ7−5に蓄積する際、使用するバッファ領域のサイズを受信パケット長に合わせて使用する。図7において、パケットを受信部7−1で受信した後、多重化(MUX)受信バッファ部7−2に実装した一時格納メモリに一定量の受信パケットを格納する。その後、バッファ管理部7−3に蓄積完了情報(データ書込み完了フラグ)及び受信パケット長情報を通知する。   When storing the received packet in the buffering shared memory 7-5, the size of the buffer area to be used is used according to the received packet length. In FIG. 7, after a packet is received by the receiving unit 7-1, a certain amount of received packet is stored in a temporary storage memory mounted in a multiplexing (MUX) receiving buffer unit 7-2. Thereafter, the buffer management unit 7-3 is notified of the storage completion information (data write completion flag) and the received packet length information.

バッファ管理部7−3は、それらの通知情報を基に受信パケットを書き込む際に使用するバッファサイズを決定する。ここで一時格納メモリをバッファリング共有メモリ7−5のバッファ領域の大きいサイズと同じサイズとし、一時格納メモリのサイズ以上のパケットを受信した際には、蓄積完了情報(データ書込み完了フラグ)を有効化することによって、受信パケットを大サイズのバッファ領域に書き込むように制御する。   The buffer management unit 7-3 determines the buffer size used when writing the received packet based on the notification information. Here, the temporary storage memory is made the same size as the large size of the buffer area of the buffering shared memory 7-5, and when a packet larger than the temporary storage memory size is received, the accumulation completion information (data write completion flag) is valid. Thus, the received packet is controlled to be written into a large buffer area.

受信パケットは受信部7−1でパケット長が計測され、該受信パケット長はバッファ管理部7−3へ転送される。多重化(MUX)受信部7−2に実装する一時格納メモリには受信ポート毎に受信パケットを格納する。該一時格納メモリが受信パケットで満杯になった時点又1つの受信パケットの格納が完了した時点で、データ書き込み完フラグを有効化する。   The packet length of the received packet is measured by the receiving unit 7-1, and the received packet length is transferred to the buffer managing unit 7-3. A reception packet is stored for each reception port in a temporary storage memory mounted in the multiplexing (MUX) reception unit 7-2. When the temporary storage memory is full of received packets or when storage of one received packet is completed, the data write completion flag is validated.

なお、データ書き込み完了フラグは、受信パケット長が閾値より大きいか否かの情報を含む2ビットのフラグとすることができる。この情報はバッファ管理部7−3内で管理する2種類のサイズの何れのバッファ領域を使用するかの判断に使用される。バッファ管理部7−3の構成は図1に示したものと同様のものである。   The data write completion flag can be a 2-bit flag that includes information on whether or not the received packet length is greater than the threshold. This information is used to determine which buffer area of two types of sizes managed in the buffer management unit 7-3 is used. The configuration of the buffer management unit 7-3 is the same as that shown in FIG.

バッファ管理部7−3は、受信部7−1及び多重化(MUX)受信バッファ7−2からの受信パケット長及びデータ書き込み完了フラグの情報を得て、以下の処理手順によりバッファリング共有メモリ7−5の管理を行う。図8にその処理手順の流れを示す。パケットを受信すると、バッファ管理部7−3は受信パケット長と設定閾値との大小比較を行う(8−1)。この大小比較結果が出力される毎に、パケット長監視部1−1内の受信数カウンタM/Nをカウントアップする(8−2)。即ち、大の比較結果であれば受信数カウンタMを、小の比較結果であれば受信数カウンタNをカウントアップする。   The buffer management unit 7-3 obtains information on the received packet length and the data write completion flag from the receiving unit 7-1 and the multiplexing (MUX) receiving buffer 7-2, and performs the following processing procedure to obtain the buffering shared memory 7 Manage -5. FIG. 8 shows the flow of the processing procedure. When the packet is received, the buffer management unit 7-3 compares the received packet length with the set threshold value (8-1). Each time this magnitude comparison result is output, the reception number counter M / N in the packet length monitoring unit 1-1 is counted up (8-2). That is, if the comparison result is large, the reception number counter M is counted up. If the comparison result is small, the reception number counter N is counted up.

パケット長監視部1−1内のタイマーにより、一定時間内の受信数カウンタM/Nのカウント数の比較計算を行い(8−3)、受信比率を算出する。該受信比率の算出結果を受信状態通知情報としてバッファサイズ振り分け部1−2に転送する。受信状態通知情報は、ステップ8−1の大小比較における設定閾値を境にした大サイズパケットと小サイズパケットの受信数の比率を示している。   The timer in the packet length monitoring unit 1-1 compares and calculates the count number of the reception number counter M / N within a certain time (8-3), and calculates the reception ratio. The calculation result of the reception ratio is transferred to the buffer size distribution unit 1-2 as reception state notification information. The reception status notification information indicates the ratio of the number of received large-size packets and small-size packets at the set threshold in the size comparison in step 8-1.

バッファサイズ振り分け部1−2は、受信状態通知情報を入力すると次に更新されるまで該受信数の比率を保持し(8−4)、該受信数の比率を用いて使用済みポインタ(空ポインタ)を次回に使用する際に大小何れのサイズで使用するかを決定する(8−7)。使用済みポインタ(空ポインタ)がポインタ管理部1−6から受信されると(8−5)、バッファサイズ管理メモリ1−3におけるサブアドレスフラグが全て“1”かどうかを調べ(8−6)、サブアドレスフラグが全て“1”である場合に、該使用済みポインタ(空ポインタ)について次回に使用する際のサイズを決定する(8−7)。   When receiving the reception status notification information, the buffer size distribution unit 1-2 holds the ratio of the received number until the next update (8-4), and uses the received number ratio (empty pointer). ) Is used next time, it is determined whether to use a large or small size (8-7). When the used pointer (empty pointer) is received from the pointer management unit 1-6 (8-5), it is checked whether all the sub-address flags in the buffer size management memory 1-3 are “1” (8-6). When all the sub-address flags are “1”, the next use size of the used pointer (empty pointer) is determined (8-7).

上記ステップ8−7におけるサイズの決定手法として、ステップ8−4で得られた受信数の比率と、使用済みポインタ(空ポインタ)の各サイズ毎の振り分け回数の比率とが一致するように振り分ける構成とすることができる。また、過去の大サイズ小サイズのバッファ領域の構成比を記憶しておき、該バッファ領域の構成比と大小パケット長受信数の比率との差分を算出し、該差分が小さくなる方向へ使用済みポインタ(空ポインタ)のサイズを決定する構成とすることもできる。   As a method for determining the size in step 8-7, a configuration in which the ratio of the number of receptions obtained in step 8-4 and the ratio of the number of allocations for each size of used pointers (empty pointers) are matched. It can be. Also, the past composition ratio of large and small buffer areas is stored, the difference between the composition ratio of the buffer area and the ratio of the number of large and small packet lengths received is calculated, and the difference is used in the direction of decreasing the difference. It is also possible to adopt a configuration for determining the size of the pointer (empty pointer).

バッファサイズ振り分け部1−2で空きポインタの次回のサイズを決定した後、空ポインタサイズ指示と共に空ポインタを空ポインタ管理部1−4へ転送する。空ポインタ管理部1−4は空きポインタサイズ指示及び空きポインタの情報を基に、異なるバッファサイズ毎の空ポインタキュー#0又は#1に空きポインタをキューイングして(8−8)、空ポインタのリンクリストを作成する。   After the buffer size distribution unit 1-2 determines the next size of the empty pointer, the empty pointer is transferred to the empty pointer management unit 1-4 together with an empty pointer size instruction. The empty pointer management unit 1-4 queues an empty pointer in the empty pointer queue # 0 or # 1 for each different buffer size based on the empty pointer size instruction and the empty pointer information (8-8). Create a linked list of

ステップ8−7の決定処理により、異なるバッファサイズ毎の空ポインタキュー#0及び#1にキューイングしているそれぞれの空バッファ領域の数が決定し、図4に示すようにバッファリング共有メモリにおけるサイズの異なるバッファ領域の構成比が変更される。受信パケットのパケット長の状況に応じて、バッファリング共有メモリのバッファサイズの構成比を随時適応的に変化させることができ、バッファリング共有メモリの使用効率を向上させることができる。   The number of empty buffer areas queued in empty pointer queues # 0 and # 1 for different buffer sizes is determined by the determination process in step 8-7, and as shown in FIG. The composition ratio of the buffer areas having different sizes is changed. The composition ratio of the buffer size of the buffering shared memory can be adaptively changed as needed according to the situation of the packet length of the received packet, and the use efficiency of the buffering shared memory can be improved.

以下、本発明によるバッファリング共有メモリの使用効率の向上について具体的な数値例を挙げて説明する。ここで一例としてバッファリング共有メモリのサイズを1Mバイトとし、2種類の固定長バッファ領域のサイズをそれぞれ512バイト、64バイトとし、初期状態のバッファリング共有メモリには、512バイトのバッファ領域が1000個、64バイトのバッファ領域が8000個存在して始動するものとする。   Hereinafter, improvement of the use efficiency of the buffering shared memory according to the present invention will be described with specific numerical examples. Here, as an example, the size of the buffering shared memory is 1 Mbytes, the sizes of the two fixed-length buffer areas are 512 bytes and 64 bytes, respectively, and the buffering shared memory in the initial state has a buffer area of 512 bytes of 1000 bytes. It is assumed that there are 8000 buffer areas of 64 bytes and 64 bytes.

受信パケット長監視部1−1内に、512バイト以上のパケット長の受信パケット数を計数する受信数カウンタAと、512バイト未満のパケット長の受信パケット数を計数する受信数カウンタBとを設け、或る所定時間内に受信した受信パケットの量の比率を監視し、バッファサイズ振り分け部1−2は該比率を基に、使用済みポインタを512バイトサイズのバッファ領域として使用するか、64バイトサイズのバッファ領域として使用するかを判断する。このように受信パケットの長さの統計データを基に、バッファサイズを使い分けることにより以下の効果が得られる。   In the reception packet length monitoring unit 1-1, a reception number counter A for counting the number of received packets having a packet length of 512 bytes or more and a reception number counter B for counting the number of received packets having a packet length of less than 512 bytes are provided. The ratio of the amount of received packets received within a predetermined time is monitored, and the buffer size distribution unit 1-2 uses the used pointer as a 512-byte buffer area based on the ratio, or 64 bytes. Determine whether to use as a size buffer area. Thus, the following effects can be obtained by properly using the buffer size based on the statistical data of the length of the received packet.

従来型において、バッファリング共有メモリの構成を全て512バイトのバッファ領域にすると固定長バッファ領域は2000個、全て64バイトのバッファ領域にすると固定長バッファ領域は16000個となるが、全て512バイトのバッファ領域でバッファリング共有メモリを構成した場合、
・64バイトのパケットを受信すると、使用効率は64/512=12.5%
・65バイトのパケットを受信すると、使用効率は65/512=12.7%
・512バイトのパケットを受信すると、使用効率は512/512=100%
・513バイトのパケットを受信すると、使用効率は(513/512)×2=50%
となる。
In the conventional type, if the buffering shared memory configuration is all 512-byte buffer area, the fixed-length buffer area is 2000, and if it is all 64-byte buffer area, the fixed-length buffer area is 16000. When buffering shared memory is configured in the buffer area,
・ When a 64-byte packet is received, the usage efficiency is 64/512 = 12.5%
・ When a 65-byte packet is received, the usage efficiency is 65/512 = 12.7%
・ When 512-byte packet is received, usage efficiency is 512/512 = 100%
・ When a 513-byte packet is received, the usage efficiency is (513/512) × 2 = 50%
It becomes.

一方、全て64バイトのバッファ領域でバッファリング共有メモリを構成した場合、
・64バイトのパケットを受信すると、使用効率は64/64=100%
・65バイトのパケットを受信すると、使用効率は(65/64)×2=50%
・512バイトのパケットを受信すると、使用効率は(512/64)×8=100%
・513バイトのパケットを受信すると、使用効率は(513/64)×9=89%
となる。
On the other hand, when a buffering shared memory is configured with a buffer area of all 64 bytes,
・ When a 64-byte packet is received, the usage efficiency is 64/64 = 100%
・ When a 65-byte packet is received, the usage efficiency is (65/64) × 2 = 50%
・ When a 512-byte packet is received, the usage efficiency is (512/64) × 8 = 100%
・ When a 513-byte packet is received, the usage efficiency is (513/64) × 9 = 89%
It becomes.

上記の数値例から明らかなように、512バイトよりも64バイトのバッファサイズでバッファリング共有メモリを構成したときの方が使用効率は良い。しかし、管理すべきバッファ領域(ポインタ)数が512バイトのサイズに対して64バイトのサイズの方が8倍となり、64バイトのサイズのみにするとポインタ管理部のハードウェア規模が増大してしまう。   As is clear from the above numerical example, the use efficiency is better when the buffering shared memory is configured with a buffer size of 64 bytes than 512 bytes. However, the number of buffer areas (pointers) to be managed is 8 times the size of 64 bytes compared to the size of 512 bytes. If only the size of 64 bytes is used, the hardware scale of the pointer management unit increases.

そこで、本発明のようにバッファリング共有メモリを、大小2種類のサイズのバッファ領域に分割して使用することにより、前述の大小2種類のサイズのバッファ領域の長所・短所を補うことができる。そして、その2種類のサイズのバッファ領域の割合を、受信パケット長の統計データに応じて随時変更することにより、様々なパケット長の受信パケットが混在して入力される状態でも、バッファ領域を効率よく使用し、また、ハードウェア規模の増大を最小限に抑えたバッファリング共有メモリを構成することができる。   Thus, by dividing the buffering shared memory into two large and small buffer areas as in the present invention, the advantages and disadvantages of the two large and small buffer areas can be compensated. By changing the ratio of the two types of buffer areas according to the received packet length statistical data, the buffer area can be efficiently used even when received packets of various packet lengths are input together. It is possible to configure a buffering shared memory that is frequently used and minimizes an increase in hardware scale.

本発明によるパケット蓄積装置におけるバッファ管理部の構成を示す図である。It is a figure which shows the structure of the buffer management part in the packet storage apparatus by this invention. 本発明の空きポインタ管理部の構成例を示す図である。It is a figure which shows the structural example of the empty pointer management part of this invention. 本発明によるバッファリング共有メモリの構成変更例を示す図である。It is a figure which shows the example of a structure change of the buffering shared memory by this invention. 本発明によるバッファリング共有メモリの構成変更例を示す図である。It is a figure which shows the example of a structure change of the buffering shared memory by this invention. 本発明のバッファサイズ管理メモリの構成を示す図である。It is a figure which shows the structure of the buffer size management memory of this invention. バッファリング共有メモリにおける小サイズ(nバイト)バッファ領域の割当て例を示す図である。It is a figure which shows the example of allocation of the small size (n byte) buffer area | region in a buffering shared memory. 本発明によるパケットスイッチの構成例を示す図である。It is a figure which shows the structural example of the packet switch by this invention. 本発明によるバッファリング共有メモリの管理の処理手順を示す図である。It is a figure which shows the process sequence of management of the buffering shared memory by this invention. 従来のバッファリング共有メモリへの蓄積の管理方式の説明図である。It is explanatory drawing of the management system of the accumulation | storage to the conventional buffering shared memory.

符号の説明Explanation of symbols

1−1 受信パケット長監視部
1−2 バッファサイズ振り分け部
1−3 バッファ管理メモリ
1−4 空ポインタ管理部
1−5 空ポインタメモリ
1−6 ポインタ管理部
1-1 Received packet length monitoring unit 1-2 Buffer size distribution unit 1-3 Buffer management memory 1-4 Empty pointer management unit 1-5 Empty pointer memory 1-6 Pointer management unit

Claims (5)

入力される可変長受信パケットの長さについての受信頻度の統計データを算定する受信パケット長監視手段と、
可変長受信パケットを格納するサイズの異なる複数種類のバッファ領域から構成されるバッファリング共有メモリと、
該バッファリング共有メモリにおけるサイズの異なる複数種類のバッファ領域の構成比率を、前記受信パケット長監視手段から得た可変長受信パケットの長さについての受信頻度の統計データを基に変更する手段と
を備えたことを特徴とする可変長パケット蓄積装置。
Received packet length monitoring means for calculating reception frequency statistical data on the length of the input variable-length received packet;
A buffering shared memory composed of multiple types of buffer areas of different sizes for storing variable-length received packets;
Means for changing the composition ratio of a plurality of types of buffer areas having different sizes in the buffering shared memory based on reception frequency statistical data on the length of the variable-length reception packet obtained from the reception packet length monitoring means; A variable-length packet storage device comprising:
前記受信パケット長監視手段は、入力される可変長受信パケットの長さが所定の閾値以上か否かを判定して可変長受信パケットを大小2種類の何れかに振り分ける手段を備え、
前記振り分け手段により振り分けた大サイズの可変長受信パケットを大サイズのバッファ領域に格納し、小サイズの可変長受信パケットを小サイズのバッファ領域に格納する構成を有することを特徴とする請求項1に記載の可変長パケット蓄積装置。
The received packet length monitoring means includes means for determining whether the length of the input variable-length received packet is equal to or greater than a predetermined threshold and allocating the variable-length received packet to one of two types, large and small,
2. A configuration in which a large variable-length received packet distributed by the distributing unit is stored in a large buffer area, and a small variable-length received packet is stored in a small buffer area. A variable-length packet storage device according to claim 1.
前記バッファ領域を、大サイズのバッファ領域と該大サイズのバッファ領域を複数個に分割した小サイズとのバッファ領域とから構成し、大サイズのバッファ領域の単位でその先頭アドレスのみを空きポインタとして管理する空きポインタメモリと、
大サイズのバッファ領域の単位毎に各小サイズのバッファ領域の空き状態を示すサブアドレスフラグを記憶するバッファサイズ管理メモリと
を備えたことを特徴とする請求項1又は2に記載の可変長パケット蓄積装置。
The buffer area is composed of a large-sized buffer area and a small-sized buffer area obtained by dividing the large-sized buffer area into a plurality of pieces, and only the head address of the large-sized buffer area is used as an empty pointer. Free pointer memory to manage,
The variable-length packet storage according to claim 1 or 2, further comprising: a buffer size management memory for storing a subaddress flag indicating a free state of each small size buffer area for each unit of the large size buffer area. apparatus.
入力される可変長受信パケットの長さについての受信頻度の統計データを算定する受信パケット長監視ステップと、
サイズの異なる複数種類のバッファ領域で構成された受信パケット格納用のバッファリング共有メモリに対して、該サイズの異なる複数種類のバッファ領域の構成比率を、前記受信パケット長監視手段から得られる可変長受信パケットの長さについての受信頻度の統計データを基に変更するステップと、
入力される可変長受信パケットの長さに応じて最も少ない不使用領域となるバッファ領域を選択して該可変長受信パケットを格納するステップと
を含むことを特徴とする可変長パケット蓄積方法。
A reception packet length monitoring step for calculating reception frequency statistical data on the length of the input variable-length reception packet;
A variable length obtained from the received packet length monitoring means, with respect to a buffering shared memory for storing received packets configured with a plurality of types of buffer areas of different sizes, the composition ratio of the plurality of types of buffer areas of different sizes. Changing the received frequency based on the received packet length statistics,
And selecting a buffer area that is the least unused area according to the length of the input variable-length received packet and storing the variable-length received packet.
前記受信パケット長監視ステップは、入力される可変長受信パケットの長さが所定の閾値以上か否かを判定して可変長受信パケットを大小2種類の何れかに振り分けるステップを含み、
前記振り分けステップにより振り分けた大サイズの可変長受信パケットを大サイズのバッファ領域に格納し、小サイズの可変長受信パケットを小サイズのバッファ領域に格納するステップを有することを特徴とする請求項4に記載の可変長パケット蓄積方法。
The received packet length monitoring step includes a step of determining whether or not the length of the input variable-length received packet is equal to or greater than a predetermined threshold and allocating the variable-length received packet to one of two types, large and small,
5. The method according to claim 4, further comprising the steps of: storing a large variable-length received packet distributed in the distribution step in a large buffer area; and storing a small variable-length received packet in a small buffer area. The variable length packet storage method described in 1.
JP2003419090A 2003-12-17 2003-12-17 Variable length packet storage apparatus and method Expired - Fee Related JP4228296B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003419090A JP4228296B2 (en) 2003-12-17 2003-12-17 Variable length packet storage apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003419090A JP4228296B2 (en) 2003-12-17 2003-12-17 Variable length packet storage apparatus and method

Publications (2)

Publication Number Publication Date
JP2005184179A JP2005184179A (en) 2005-07-07
JP4228296B2 true JP4228296B2 (en) 2009-02-25

Family

ID=34781075

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003419090A Expired - Fee Related JP4228296B2 (en) 2003-12-17 2003-12-17 Variable length packet storage apparatus and method

Country Status (1)

Country Link
JP (1) JP4228296B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5016880B2 (en) * 2006-09-21 2012-09-05 富士通株式会社 Memory management method and apparatus according to priority class
JP5278157B2 (en) * 2009-05-15 2013-09-04 富士通株式会社 Transmission apparatus and transmission method
CN103605485B (en) * 2013-11-29 2017-01-18 深圳市道通科技股份有限公司 Variable-length data storing method and device
CN111796902B (en) * 2019-04-08 2024-03-19 维塔科技(北京)有限公司 Method and device for switching shared memory area, storage medium and electronic equipment

Also Published As

Publication number Publication date
JP2005184179A (en) 2005-07-07

Similar Documents

Publication Publication Date Title
US9106577B2 (en) Systems and methods for dropping data using a drop profile
US8036117B1 (en) Dequeuing and congestion control systems and methods
US7711005B1 (en) Systems and methods for determining the bandwidth used by a queue
CN1881937B (en) Method and device for making storage space dynamic distribution for multi queue
US7307998B1 (en) Computer system and network interface supporting dynamically optimized receive buffer queues
US7613199B1 (en) Systems and methods for permitting queues to oversubscribe
US8072998B2 (en) Systems and methods for congestion control using random early drop at head of buffer
US7400638B2 (en) Apparatus and methods for managing packets in a broadband data stream
US8078763B1 (en) Dequeuing and congestion control systems and methods for single stream multicast
US8312243B2 (en) Memory management in network processors
JPWO2004066570A1 (en) Network switch device and network switch method
CN113037640A (en) Data forwarding method, data caching device and related equipment
CN101356777B (en) Managing on-chip queues in switched fabric networks
US7088731B2 (en) Memory management for packet switching device
JP4228296B2 (en) Variable length packet storage apparatus and method
US8094552B1 (en) Adaptive buffer for frame based storage communications protocols
EP1351439A1 (en) Embedded system for broadcast traffic congestion control in communication network
US20020066000A1 (en) Transporting data transmission units of different sizes using segments of fixed sizes
JP5482028B2 (en) Information processing apparatus, transmission apparatus, and information processing method
JP2933904B2 (en) Common buffer type asynchronous transfer mode switch
US10002092B2 (en) Arithmetic processing unit, and method of controlling arithmetic processing unit
WO2023125430A1 (en) Traffic management apparatus, packet caching method, chip, and network device
WO2023284337A1 (en) Mapping method for optical service unit, apparatus, storage medium, and electronic apparatus
CN110661724B (en) Method and equipment for allocating cache
EP1347597A2 (en) Embedded system having multiple data receiving channels

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061006

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081015

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20081119

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20111212

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20121212

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20121212

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20131212

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees