JP2009017439A - Packet transfer device and method - Google Patents

Packet transfer device and method Download PDF

Info

Publication number
JP2009017439A
JP2009017439A JP2007179419A JP2007179419A JP2009017439A JP 2009017439 A JP2009017439 A JP 2009017439A JP 2007179419 A JP2007179419 A JP 2007179419A JP 2007179419 A JP2007179419 A JP 2007179419A JP 2009017439 A JP2009017439 A JP 2009017439A
Authority
JP
Japan
Prior art keywords
information
cache block
unit
processing
cache
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.)
Pending
Application number
JP2007179419A
Other languages
Japanese (ja)
Inventor
Kenichi Sato
謙一 佐藤
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.)
SII Network Systems Inc
Original Assignee
SII Network Systems Inc
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 SII Network Systems Inc filed Critical SII Network Systems Inc
Priority to JP2007179419A priority Critical patent/JP2009017439A/en
Publication of JP2009017439A publication Critical patent/JP2009017439A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To make speed of forwarding processing fast without using a special memory nor dedicated hardware. <P>SOLUTION: A packet transfer device includes a storage unit which has a plurality of information entries, a field extraction unit which extracts a field associated with forwarding of packets, a cache unit which have a plurality of cache blocks, a cache block specification unit which specifies a cache block, a decision unit which decides whether a cache block includes processing information, and a forwarding unit which reads reference information out of the information entry of the storage unit, performs packet transfer processing on the basis of the read reference information, and stores the reference information and processing information together in a cache block, when it is decided that no processing information is present, and reads processing information out of a cache block and performs packet transfer processing on the basis of the read processing information when it is decided that the processing information is present. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、パケットの転送を行うパケット転送装置およびパケット転送方法に関する。   The present invention relates to a packet transfer apparatus and a packet transfer method for transferring a packet.

ブリッジ、ルータといった通信装置は、パケットと呼ばれるひとかたまりになったデータの入出力インターフェース(ポート)を複数有する。これらの装置は、パケットごとに、そのパケットが受信されたポートに付随する情報やそのパケットに付与されている制御情報を元に、装置内の多数のデータベースを検索、参照して、そのパケットの処理方法を決定する。処理の中には、パケットの制御情報を変更、加工したり、パケットの流入、流出量を基準に廃棄したり、あるいは、データベースの検索結果に基づいて特定のポートに送信するといった操作が含まれる。これらの処理は、多数のデータベースを検索する必要があり、通信インターフェースが高速になると、データベースを記憶する装置内の記憶装置(メモリ)がボトルネックとなり、処理速度が制限されてしまい、通信インターフェースの伝送速度を完全に使い切れない状態になってしまう。そのため、従来の装置では、検索速度をあげるために、連想メモリ(CAM:Content Addressable Memory)と呼ばれる特殊なメモリやデータベースを検索するための専用のハードウェアを用いている(例えば特許文献1参照)。
特開平06−261078
Communication devices such as bridges and routers have a plurality of data input / output interfaces (ports) called a packet. For each packet, these devices search and refer to a large number of databases in the device based on the information attached to the port from which the packet was received and the control information attached to the packet. Determine the processing method. The processing includes operations such as changing or processing packet control information, discarding packets based on the inflow or outflow amount of packets, or sending to specific ports based on database search results. . In these processes, it is necessary to search a large number of databases. When the communication interface becomes high speed, the storage device (memory) in the apparatus storing the database becomes a bottleneck, and the processing speed is limited. The transmission speed is not completely used up. Therefore, in the conventional apparatus, in order to increase the search speed, a special memory called a content addressable memory (CAM) or dedicated hardware for searching a database is used (for example, see Patent Document 1). .
JP 06-261078

しかし、CAMのような特殊なメモリや専用ハードウェアを搭載した場合、装置のコストや電力消費が大きくなり、引いては、装置全体の排熱や筐体の大きさにまで影響する。また、特殊なメモリは、前述の理由により実装容量に厳しい制限があるため、装置のデータベースの容量に厳しい制限が課せられる。また、特殊なハードウェアやメモリによって、検索機能が制限されフォワーディングポリシーやパケットの加工処理の柔軟性を犠牲にせざるを得ないという問題がある。   However, when a special memory such as a CAM or dedicated hardware is installed, the cost and power consumption of the device increase, which in turn affects the exhaust heat of the entire device and the size of the housing. In addition, a special memory has a strict limit on the mounting capacity due to the above-described reason, and thus a strict limit is imposed on the capacity of the database of the apparatus. In addition, the search function is limited by special hardware and memory, and there is a problem that the flexibility of the forwarding policy and packet processing processing must be sacrificed.

本発明は、上記の課題を解決するためになされたものであり、特殊なメモリや専用ハードウェアを使用することなくフォワーディング処理の速度を速くすることが可能なパケット転送装置を提供することを目的とする。   The present invention has been made to solve the above-described problems, and an object of the present invention is to provide a packet transfer apparatus that can increase the speed of forwarding processing without using a special memory or dedicated hardware. And

上記の課題を解決するため、本発明の一態様によるパケット転送装置は、パケットの転送処理に関連する参照情報を記憶する情報エントリを複数個備えた記憶部と、前記パケットよりパケットのフォワーディングに関連するフィールドを抽出するフィールド抽出部と、前記フォワーディングに関連するフィールドに対応する前記参照情報をまとめて記憶するキャッシュブロックを複数備えたキャッシュ部と、前記フィールド抽出部が抽出した前記フォワーディングに関連するフィールドに基づいて前記キャッシュブロックを特定するキャッシュブロック特定部と、前記キャッシュブロック特定部で特定された前記キャッシュブロックに、前記処理情報が存在するか否か判断する判断部と、前記判断部で前記処理情報が存在しないと判断された場合、前記フォワーディングに関連するフィールドに基づいて前記参照情報を前記記憶部の前記情報エントリより読み出し、読み出した当該参照情報に基づいて前記パケットの転送処理を行い、当該参照情報を前記処理情報としてまとめて前記キャッシュブロック特定部で特定した前記キャッシュブロックに記憶させ、前記判断部で前記処理情報が存在すると判断された場合、前記キャッシュブロック特定部で特定した前記キャッシュブロックより前記処理情報を読み出し、読み出した当該処理情報に基づいて前記パケットの転送処理を行うフォワーディング部と、を備えたことを特徴とする。これにより、キャッシュブロック特定部はフォワーディングに関連するフィールドに基づいてキャッシュブロックを特定し、フォワーディング部はパケット転送処理を行う際に記憶部より読み取る参照情報を、キャッシュブロック特定部が特定したキャッシュブロック部に記憶させ、フォワーディング部は、同じ処理情報を使用してパケット転送処理を行う際にはキャッシュブロックに記憶させた参照情報を読み取ってパケット転送処理を行う。   In order to solve the above problems, a packet transfer apparatus according to an aspect of the present invention relates to a storage unit including a plurality of information entries for storing reference information related to packet transfer processing, and to packet forwarding from the packet. A field extraction unit for extracting a field to be processed, a cache unit including a plurality of cache blocks that collectively store the reference information corresponding to the field related to the forwarding, and a field related to the forwarding extracted by the field extraction unit A cache block specifying unit that specifies the cache block based on the cache block, a determination unit that determines whether or not the processing information exists in the cache block specified by the cache block specifying unit, and the processing by the determination unit Information was determined not to exist In this case, the reference information is read from the information entry of the storage unit based on the field related to the forwarding, the packet is transferred based on the read reference information, and the reference information is collected as the processing information. When the determination unit determines that the processing information is present, the processing information is read from the cache block specified by the cache block specification unit and read. And a forwarding unit that performs transfer processing of the packet based on the processing information. As a result, the cache block identifying unit identifies the cache block based on the field related to forwarding, and the forwarding unit identifies the cache block unit identified by the cache block identifying unit as reference information read from the storage unit when performing packet transfer processing. When the packet forwarding process is performed using the same processing information, the forwarding unit reads the reference information stored in the cache block and performs the packet forwarding process.

また、本発明の一態様によるパケット転送装置は、カウンタ情報を更新するカウンタ情報更新部を備え、前記情報エントリはさらに第一のカウンタ情報を記憶し、前記キャッシュブロックはさらに第二のカウンタ情報を記憶し、前記フォワーディング部はさらに、前記キャッシュ部より前記処理情報を読み出す際に、前記第二のカウンタ情報を更新し、前記カウンタ更新部は前記第二のカウンタ情報に基づいて前記第一のカウンタ情報を更新し、さらに前記第二のカウンタ情報を更新することを特徴とする。これにより、キャッシュブロックは第二のカウンタ情報を記憶し、カウンタ情報更新部はキャッシュブロックが記憶した第二のカウンタ情報を読み取り、情報エントリ部が記憶する第一のカウンタ情報に基づいて第二のカウンタ情報を更新する。   The packet transfer apparatus according to an aspect of the present invention further includes a counter information updating unit that updates counter information, the information entry further stores first counter information, and the cache block further stores second counter information. And the forwarding unit further updates the second counter information when reading the processing information from the cache unit, and the counter updating unit updates the first counter based on the second counter information. The information is updated, and the second counter information is further updated. Thus, the cache block stores the second counter information, the counter information update unit reads the second counter information stored by the cache block, and the second counter information is stored based on the first counter information stored by the information entry unit. Update counter information.

また、本発明の一態様によるパケット転送装置は、エージング情報を更新するエージング情報更新部を備え前記情報エントリはさらに第一のエージング情報を記憶し、前記キャッシュブロックはさらに第二のエージング情報を記憶し、前記フォワーディング部はさらに、前記キャッシュブロックより前記処理情報を読み出す際に、前記第二のエージング情報を更新し、前記エージング情報更新部は前記第二のエージング情報に基づいて前記第一のエージング情報を更新し、さらに前記第二のエージング情報を更新することを特徴とする。これにより、キャッシュブロックは第二のエージング情報を記憶し、エージング情報更新部はキャッシュブロックが記憶した第二のエージング情報を読み取り、情報エントリ部が記憶する第一のエージング情報に基づいて第二のエージング情報を更新する。   The packet transfer apparatus according to an aspect of the present invention further includes an aging information update unit that updates aging information, the information entry further stores first aging information, and the cache block further stores second aging information. The forwarding unit further updates the second aging information when reading the processing information from the cache block, and the aging information update unit updates the first aging based on the second aging information. The information is updated, and the second aging information is further updated. Thus, the cache block stores the second aging information, the aging information update unit reads the second aging information stored in the cache block, and the second aging information stored in the information entry unit is stored in the second aging information. Update aging information.

また、本発明の一態様によるパケット転送方法は、パケットの転送処理に関連する参照情報を記憶する情報エントリを複数個備えた記憶部と、フォワーディングに関連するフィールドに対応する前記参照情報をまとめて記憶するキャッシュブロックを複数備えたキャッシュ部と、を備えた装置でのパケット転送方法として、前記パケットよりパケットのフォワーディングに関連するフィールドを抽出するフィールド抽出ステップと、前記フィールド抽出ステップが抽出した前記フォワーディングに関連するフィールドに基づいて前記キャッシュブロックを特定するキャッシュブロック特定ステップと、前記キャッシュブロック特定ステップで特定された前記キャッシュブロックに、前記処理情報が存在するか否か判断する判断ステップと、前記判断ステップで前記処理情報が存在しないと判断された場合、前記フォワーディングに関連するフィールドに基づいて前記参照情報を前記記憶部の前記情報エントリより読み出し、読み出した当該参照情報に基づいて前記パケットの転送処理を行い、当該参照情報を前記処理情報としてまとめて前記キャッシュブロック特定ステップで特定した前記キャッシュブロックに記憶させ、前記判断ステップで前記処理情報が存在すると判断された場合、前記キャッシュブロック特定ステップで特定した前記キャッシュブロックより前記処理情報を読み出し、読み出した当該処理情報に基づいて前記パケットの転送処理を行うフォワーディングステップと、を備えたことを特徴とする。   According to another aspect of the present invention, there is provided a packet transfer method comprising: a storage unit including a plurality of information entries for storing reference information related to packet transfer processing; and the reference information corresponding to a field related to forwarding. As a packet transfer method in an apparatus comprising a plurality of cache blocks for storing, a field extraction step for extracting a field related to packet forwarding from the packet, and the forwarding extracted by the field extraction step A cache block specifying step for specifying the cache block based on a field associated with the cache block; a determining step for determining whether or not the processing information exists in the cache block specified in the cache block specifying step; When it is determined in the determination step that the processing information does not exist, the reference information is read from the information entry of the storage unit based on the field related to the forwarding, and the packet is transferred based on the read reference information Perform the processing, store the reference information as the processing information in the cache block specified in the cache block specifying step, and determine that the processing information exists in the determining step, the cache block specifying step A forwarding step of reading the processing information from the identified cache block and performing a transfer process of the packet based on the read processing information.

また、本発明の一態様によるパケット転送方法は、カウンタ情報を更新するカウンタ情報更新ステップを備え、前記情報エントリはさらに第一のカウンタ情報を記憶し、前記キャッシュブロックはさらに第二のカウンタ情報を記憶し、前記フォワーディングステップはさらに、前記キャッシュ部より前記処理情報を読み出す際に、前記第二のカウンタ情報を更新し、前記カウンタ更新ステップは前記第二のカウンタ情報に基づいて前記第一のカウンタ情報を更新し、さらに前記第二のカウンタ情報を更新することを特徴とする。   The packet transfer method according to an aspect of the present invention further includes a counter information update step for updating counter information, wherein the information entry further stores first counter information, and the cache block further stores second counter information. Storing, and the forwarding step further updates the second counter information when the processing information is read from the cache unit, and the counter updating step is configured to update the first counter based on the second counter information. The information is updated, and the second counter information is further updated.

また、本発明の一態様によるパケット転送方法は、エージング情報を更新するエージング情報更新ステップを備え、前記情報エントリはさらに第一のエージング情報を記憶し、前記キャッシュブロックはさらに第二のエージング情報を記憶し、前記フォワーディングステップはさらに、前記キャッシュブロックより前記処理情報を読み出す際に、前記第二のエージング情報を更新し、前記エージング情報更新ステップは前記第二のエージング情報に基づいて前記第一のエージング情報を更新し、さらに前記第二のエージング情報を更新することを特徴とする。   The packet transfer method according to an aspect of the present invention further includes an aging information update step for updating aging information, the information entry further stores first aging information, and the cache block further stores second aging information. Storing, and the forwarding step further updates the second aging information when reading the processing information from the cache block, and the aging information updating step is based on the second aging information. The aging information is updated, and the second aging information is updated.

本発明は、特殊なメモリや専用ハードウェアを使用することなくパケット転送処理の速度を速くすることが可能なパケット転送装置を提供することを目的とする。   An object of the present invention is to provide a packet transfer apparatus capable of increasing the speed of packet transfer processing without using a special memory or dedicated hardware.

以下、図面を参照し、本発明の実施形態を説明する。図1は本発明の一実施形態によるスイッチ装置1(パケット転送装置)の構成を示すブロック図である。スイッチ装置1は制御カード装置2と、入出力ラインカード装置3−1〜3−3と、フォワーディング処理装置4−1〜4−3と、スイッチ部6とを備える。制御カード装置2はスイッチ装置1の全体の制御を行う。また、フォワーディング処理装置4−1はパケット処理部5−1を備え、フォワーディング処理装置4−2はパケット処理部5−2を備え、フォワーディング処理装置4−3はパケット処理部5−3を備える。パケット処理部5−1〜5−3はスイッチ部6と接続されており、スイッチ部6を介しパケット処理部5−1〜5−3間でパケットの送受信を行うことが可能である。パケット処理部5−1は入出力ラインカード装置3−1と接続され、パケット処理部5−2は入出力ラインカード装置3−2と接続され、パケット処理部5−3は入出力ラインカード装置3−3と接続されている。パケット処理部5−1〜5−3は入出力ラインカード装置3より受信したパケットの転送処理を行う。入出力ラインカード装置3−1〜3−3はそれぞれポートを3つ備えており、ポートを介して外部装置(図示せず)とパケットの送受信を行う。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a switch device 1 (packet transfer device) according to an embodiment of the present invention. The switch device 1 includes a control card device 2, input / output line card devices 3-1 to 3-3, forwarding processing devices 4-1 to 4-3, and a switch unit 6. The control card device 2 controls the entire switch device 1. The forwarding processing device 4-1 includes a packet processing unit 5-1, the forwarding processing device 4-2 includes a packet processing unit 5-2, and the forwarding processing device 4-3 includes a packet processing unit 5-3. The packet processing units 5-1 to 5-3 are connected to the switch unit 6, and packets can be transmitted and received between the packet processing units 5-1 to 5-3 via the switch unit 6. The packet processing unit 5-1 is connected to the input / output line card device 3-1, the packet processing unit 5-2 is connected to the input / output line card device 3-2, and the packet processing unit 5-3 is connected to the input / output line card device 3-1. 3-3. The packet processing units 5-1 to 5-3 perform transfer processing of packets received from the input / output line card device 3. Each of the input / output line card devices 3-1 to 3-3 includes three ports, and transmits and receives packets to and from an external device (not shown) via the ports.

図2は本実施形態のパケット転送装置の構成を示す機能ブロック図である。パケット転送装置1は、入出力ポート3と、フィールド抽出部11と、インデックス計算部12(キャッシュブロック特定部)と、検証情報格納部13と、検証部14と、フォワーディング部17と、キャッシュ部200とデータベース1(521−1)〜データベースn(521−n)(記憶部)とを備える。また、フォワーディング部17は、データベース参照フォワーディング部15と、キャッシュ参照フォワーディング部16とを備える。キャッシュ部200はキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)を含む。   FIG. 2 is a functional block diagram showing the configuration of the packet transfer apparatus of this embodiment. The packet transfer apparatus 1 includes an input / output port 3, a field extraction unit 11, an index calculation unit 12 (cache block specifying unit), a verification information storage unit 13, a verification unit 14, a forwarding unit 17, and a cache unit 200. And database 1 (521-1) to database n (521-n) (storage unit). The forwarding unit 17 includes a database reference forwarding unit 15 and a cache reference forwarding unit 16. The cache unit 200 includes a cache block 1 (210-1) to a cache block t (210-t).

図示する例では、データベースはデータベース1(521−1)〜データベースn(521−n)のn個がある。また、データベース1(521−1)〜データベースn(521−n)は、CPUが直接読み書き可能な主記憶装置である半導体メモリ(RAM)に記憶される。データベース1(521−1)〜データベースn(521−n)はパケットの転送処理に必要な情報である参照情報を保管している。データベース1(521−1)〜データベースn(521−n)の種類としては、ポートに関する情報を記憶するポートデータベース、イーサネット(登録商標)アドレスを記憶するフォワーディング・データベース(Forwarding DataBase,FDB)、バーチャル・ローカル・エリア・ネットワーク(Virtual Local Area Network,VLAN)の情報を記憶するバーチャル・ローカル・エリア・ネットワーク・テーブル、ポートとバーチャル・ローカル・エリア・ネットワークをキーとして検索される情報を記憶するポート・バーチャル・ローカル・エリア・ネットワーク・テーブル、パケット転送のサービスレベルの情報を記憶するクオリティ・オブ・サービス(Quality of Service,QoS)パラメータなどがある。また、データベース1(521−1)〜データベースn(521−n)は複数のエントリを有する。   In the illustrated example, there are n databases, database 1 (521-1) to database n (521-n). Database 1 (521-1) to database n (521-n) are stored in a semiconductor memory (RAM) that is a main storage device that can be directly read and written by the CPU. Database 1 (521-1) to database n (521-n) store reference information that is information necessary for packet transfer processing. The types of the database 1 (521-1) to the database n (521-n) include a port database for storing information about ports, a forwarding database (Forwarding DataBase, FDB) for storing Ethernet (registered trademark) addresses, a virtual database A virtual local area network table that stores information of a local local area network (VLAN), and a port virtual that stores information searched using ports and virtual local area networks as keys. • Quality of service (Quality of Se) that stores information on the service level of the local area network table and packet transfer vice, QoS) parameters, and the like. Database 1 (521-1) to database n (521-n) have a plurality of entries.

フィールド抽出部11は、入出力ポート3を介して受信した転送対象のパケットに含まれる、フォワーディングに関連するフィールドを抽出する。フォワーディングに関連するフィールドはパケットの一部分(ヘッダ)の中に含まれ、ソースアドレス、デスティネーションアドレス、クオリティ・オブ・サービス(Quality of Service,QoS)等を含んだ制御情報の一部である。インデックス計算部12はフィールド抽出部11で抽出したフォワーディングに関連するフィールドのハッシュ値を計算し、計算したハッシュ値に基づいてインデックスを計算し、インデックスに基づいてキャッシュ部200が含むキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)の内一つを特定する。検証情報格納部13は、フィールド抽出部11で抽出したフォワーディングに関連するフィールドを検証情報とし、当該検証情報を、インデックス計算部12が当該フィールドに基づいて特定されるキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)に格納する。検証部14(判断部)は、転送対象のパケットのフォワーディングに関連するフィールドに基づいて特定されるキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)に、当該パケットのフォワーディングに関連するフィールド(検証情報)と同一の検証情報が記憶されているか否か判断する。パケットの転送はフォワーディングに関連するフィールドに基づいて行われるため、検証情報が同一の場合は、パケットの転送処理も同一である。   The field extraction unit 11 extracts a field related to forwarding included in the transfer target packet received via the input / output port 3. A field related to forwarding is included in a part (header) of a packet, and is a part of control information including a source address, a destination address, quality of service (QoS), and the like. The index calculation unit 12 calculates a hash value of a field related to forwarding extracted by the field extraction unit 11, calculates an index based on the calculated hash value, and the cache block 1 (210 that the cache unit 200 includes based on the index -1) to one of the cache blocks t (210-t) is specified. The verification information storage unit 13 uses the field related to forwarding extracted by the field extraction unit 11 as verification information, and the index calculation unit 12 identifies the verification information based on the field as a cache block 1 (210-1). Store in cache block t (210-t). The verification unit 14 (determination unit) relates to the forwarding of the packet to the cache block 1 (210-1) to the cache block t (210-t) specified based on the field related to the forwarding of the packet to be transferred. It is determined whether or not the same verification information as the field to be checked (verification information) is stored. Since packet transfer is performed based on fields related to forwarding, when the verification information is the same, the packet transfer process is also the same.

なお、一般に、ルータやブリッジの処理では、パケットの一部分に含まれる制御情報のみが転送処理に影響を与えるという特徴があるため、パケットの転送に影響する部分のみをそのパケットの特徴として記録すれば、同種のパケットを選別できる。同種のパケットとは転送処理が同一のパケットを指す。同種のパケットを二度目以降に処理する場合には、最初の処理と同一の処理を行えばよい。そのため、同種の特徴を有するということを確認する手段とそのパケットを加工したり出力したりするときに、データベースから読み込んだパケットの転送に必要な情報すべてを一箇所のキャッシュに格納し、これをハッシュ関数で高速に検索できれば転送処理は格段に速くなる。   In general, router and bridge processing has a feature that only control information included in a part of a packet affects transfer processing. Therefore, if only a portion that affects packet transfer is recorded as a feature of the packet, , Can sort out the same kind of packets. The same type of packet refers to a packet having the same transfer process. When processing the same type of packet for the second time or later, the same processing as the first processing may be performed. Therefore, when processing and outputting the packet and the means for confirming that it has the same kind of characteristics, all the information necessary for the transfer of the packet read from the database is stored in one cache. If the hash function can be used to search at high speed, the transfer process will be much faster.

フォワーディング部17は、パケットの加工およびパケットの転送を行う。フォワーディング部17はデータベース参照フォワーディング部15と、キャッシュ参照フォワーディング部16とを備えており、パケットの加工およびバケットの転送は同様の処理を行うが、加工および転送に必要な情報の読み取り先が異なる。データベース参照フォワーディング部15はデータベース1(521−1)〜データベースn(521−n)から加工及び転送に必要な情報を読み取る。また、データベース参照フォワーディング部15は、読み取った情報を当該パケットのフィールドに基づいて特定されるキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)に書き込む。一方、キャッシュ参照フォワーディング部16は、データベース参照フォワーディング部15がデータベース1(521−1)〜データベースn(521−n)から読みだしキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)に書き込んだ情報を、キャッシュブロック1(210−1)〜キャッシュブロックt(210−t)から読み取ってパケットの加工およびパケットの転送を行う。すなわち、一度フォワーディング部17がデータベース1(521−1)〜データベースn(521−n)より読み取ったデータはキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)に書き込まれているので、以前転送処理を行ったパケットと同種の特徴を有するパケットに対し、同一の転送処理を行う場合はキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)からデータを読み取り転送処理を行う。フォワーディング部17は、検証部14が転送対象のパケットのフォワーディングに関連するフィールドに基づいて特定されるキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)に、当該パケットのフォワーディングに関連するフィールド(検証情報)と同一の検証情報が記憶されていると判断した場合はキャッシュ参照フォワーディング部16を用い、記憶されていないと判断した場合はデータベース参照フォワーディング部15を用いる。   The forwarding unit 17 processes the packet and transfers the packet. The forwarding unit 17 includes a database reference forwarding unit 15 and a cache reference forwarding unit 16. The packet processing and the bucket transfer are performed in the same manner, but the reading destination of information necessary for the processing and transfer is different. The database reference forwarding unit 15 reads information necessary for processing and transfer from the database 1 (521-1) to the database n (521-n). Further, the database reference forwarding unit 15 writes the read information into the cache block 1 (210-1) to the cache block t (210-t) specified based on the field of the packet. On the other hand, in the cache reference forwarding unit 16, the database reference forwarding unit 15 reads from the database 1 (521-1) to the database n (521-n) and the cache block 1 (210-1) to the cache block t (210-t). Is read from the cache block 1 (210-1) to the cache block t (210-t) to process the packet and transfer the packet. That is, the data once read by the forwarding unit 17 from the database 1 (521-1) to the database n (521-n) is written in the cache block 1 (210-1) to the cache block t (210-t). When the same transfer process is performed on a packet having the same type of characteristics as a packet that has been previously transferred, data is read from the cache block 1 (210-1) to cache block t (210-t) and the transfer process is performed. Do. The forwarding unit 17 relates to the forwarding of the packet to the cache block 1 (210-1) to the cache block t (210-t) specified by the verification unit 14 based on the field related to forwarding of the packet to be transferred. When it is determined that the same verification information as the field (verification information) to be stored is stored, the cache reference forwarding unit 16 is used. When it is determined that the field is not stored, the database reference forwarding unit 15 is used.

キャッシュ部200はキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)を含んでおり、半導体メモリ(RAM)上に記憶される。この半導体メモリはCAMなど特殊なメモリではなく、データベース1(521−1)〜データベースn(521−n)が記憶される半導体メモリと同様の半導体メモリであっても良い。キャッシュブロック1(210−1)〜キャッシュブロックt(210−t)はデータを記憶することができ、それぞれフォワーディング部17が連続して読み取ることが出来る領域である。   The cache unit 200 includes a cache block 1 (210-1) to a cache block t (210-t) and is stored on a semiconductor memory (RAM). This semiconductor memory is not a special memory such as CAM, but may be a semiconductor memory similar to the semiconductor memory storing the database 1 (521-1) to the database n (521-n). The cache block 1 (210-1) to the cache block t (210-t) are areas that can store data and can be read continuously by the forwarding unit 17, respectively.

図3は本実施形態におけるデータベース参照フォワーディング部の動作を説明したブロック図である。図示するように、パケット転送装置1は入出力ポート3と、処理部60と、データベース1(521−1)〜データベースn(521−n)と、キャッシュ部200とを含んで構成される。処理部60は、図2に示したフィールド抽出部11と、インデックス計算部12と、検証情報格納部13と、検証部14と、フォワーディング部17とを含む。フォワーディング部17はデータベース参照フォワーディング部15とキャッシュ参照フォワーディング部16とを備える。受信パケット20および送信パケット21は転送対象のパケットであり、パケット転送装置1により加工、転送される。   FIG. 3 is a block diagram illustrating the operation of the database reference forwarding unit in the present embodiment. As illustrated, the packet transfer apparatus 1 includes an input / output port 3, a processing unit 60, a database 1 (521-1) to a database n (521-n), and a cache unit 200. The processing unit 60 includes the field extraction unit 11, the index calculation unit 12, the verification information storage unit 13, the verification unit 14, and the forwarding unit 17 illustrated in FIG. The forwarding unit 17 includes a database reference forwarding unit 15 and a cache reference forwarding unit 16. The reception packet 20 and the transmission packet 21 are packets to be transferred, and are processed and transferred by the packet transfer apparatus 1.

図示する例では、処理部60が含むフォワーディング部17はデータベース参照フォワーディング部15を用いて転送処理を行っている。データベース参照フォワーディング部15を用いて転送処理を行う場合は、検証部14が転送対象のパケットのフォワーディングに関連するフィールドに基づいて特定されるキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)に、当該パケットのフォワーディングに関連するフィールド(検証情報)と同一の検証情報が記憶されていないと判断した場合である。すなわち、キャッシュブロック1(210−1)〜キャッシュブロックt(210−t)に参照情報が記憶されていないため、データベース1(521−1)〜データベースn(521−n)より参照情報を読み取り、パケットの転送処理を行い、転送対象のパケットのフォワーディングに関連するフィールドに基づいて特定されるキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)に読み取った参照情報を記憶させる。   In the illustrated example, the forwarding unit 17 included in the processing unit 60 performs transfer processing using the database reference forwarding unit 15. When the transfer process is performed using the database reference forwarding unit 15, the verification unit 14 identifies the cache block 1 (210-1) to the cache block t (210 −) identified based on the field related to the forwarding of the packet to be transferred. This is a case where it is determined that the same verification information as the field (verification information) related to forwarding of the packet is not stored in t). That is, since the reference information is not stored in the cache block 1 (210-1) to the cache block t (210-t), the reference information is read from the database 1 (521-1) to the database n (521-n), The packet transfer process is performed, and the read reference information is stored in the cache block 1 (210-1) to the cache block t (210-t) specified based on the field related to the forwarding of the packet to be transferred.

図4は本実施形態におけるキャッシュ参照フォワーディング部の動作を説明したブロック図である。図示するように、パケット転送装置1は入出力ポート3と、処理部60と、データベース1(521−1)〜データベースn(521−n)と、キャッシュ部200とを含んで構成される。処理部60は、図2に示したフィールド抽出部11と、インデックス計算部12と、検証情報格納部13と、検証部14と、フォワーディング部17とを含む。フォワーディング部17はデータベース参照フォワーディング部15とキャッシュ参照フォワーディング部16とを備える。受信パケット20および送信パケット21は転送対象のパケットであり、パケット転送装置1により加工、転送される。   FIG. 4 is a block diagram illustrating the operation of the cache reference forwarding unit in this embodiment. As illustrated, the packet transfer apparatus 1 includes an input / output port 3, a processing unit 60, a database 1 (521-1) to a database n (521-n), and a cache unit 200. The processing unit 60 includes the field extraction unit 11, the index calculation unit 12, the verification information storage unit 13, the verification unit 14, and the forwarding unit 17 illustrated in FIG. The forwarding unit 17 includes a database reference forwarding unit 15 and a cache reference forwarding unit 16. The reception packet 20 and the transmission packet 21 are packets to be transferred, and are processed and transferred by the packet transfer apparatus 1.

図示する例では、処理部60が含むフォワーディング部17はキャッシュ参照フォワーディング部16を用いて転送処理を行っている。キャッシュ参照フォワーディング部16を用いて転送処理を行う場合は、検証部14が転送対象のパケットのフォワーディングに関連するフィールドに基づいて特定されるキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)に、当該パケットのフォワーディングに関連するフィールド(検証情報)と同一の検証情報が記憶されていると判断した場合である。すなわち、キャッシュブロック1(210−1)〜キャッシュブロックt(210−t)に参照情報が記憶されているため、キャッシュブロック1(210−1)〜キャッシュブロックt(210−t)より参照情報を読み取り、パケットの転送処理を行う。   In the illustrated example, the forwarding unit 17 included in the processing unit 60 performs a transfer process using the cache reference forwarding unit 16. When performing the transfer process using the cache reference forwarding unit 16, the verification unit 14 identifies the cache block 1 (210-1) to the cache block t (210-) specified based on the field related to the forwarding of the packet to be transferred. This is a case where it is determined that the same verification information as the field (verification information) related to the forwarding of the packet is stored in t). That is, since the reference information is stored in the cache block 1 (210-1) to the cache block t (210-t), the reference information is obtained from the cache block 1 (210-1) to the cache block t (210-t). Read and transfer packets.

図5は本発明の一実施形態のデータベース1(521−1)〜データベースn(521−n)が記憶する参照情報と、キャッシュ上のキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)が記憶する処理情報との関連を示したブロック図である。キャッシュブロック1(210−1)からキャッシュブロックt/2まではソースアドレス用キャッシュラインである。キャッシュブロック(t/2)+1からキャッシュブロックt(210−t)はデスティネーションアドレス用キャッシュラインである。なお、tは偶数である。   FIG. 5 illustrates reference information stored in the database 1 (521-1) to the database n (521-n) according to the embodiment of the present invention, and the cache block 1 (210-1) to the cache block t (210-) on the cache. It is the block diagram which showed the relationship with the process information which t) memorize | stores. The cache block 1 (210-1) to the cache block t / 2 are source address cache lines. Cache block (t / 2) +1 to cache block t (210-t) are destination address cache lines. Note that t is an even number.

データベース1(521−1)は参照情報30−1と30−2を記憶する。データベース2(521−2)は参照情報30−3と30−4を記憶する。データベースn(521−n)は参照情報30−5と30−6を記憶する。参照情報30−1と30−4と30−5は、転送処理においてソースアドレスの処理時に参照する参照情報である。参照情報30−2と30−3と30−6は、転送処理においてデスティネーションアドレスの処理時に参照する参照情報である。   Database 1 (521-1) stores reference information 30-1 and 30-2. Database 2 (521-2) stores reference information 30-3 and 30-4. The database n (521-n) stores reference information 30-5 and 30-6. The reference information 30-1, 30-4, and 30-5 are reference information that is referred to when the source address is processed in the transfer process. The reference information 30-2, 30-3, and 30-6 are reference information that is referred to when the destination address is processed in the transfer process.

データベース1(521−1)〜データベースn(521−n)が記憶する参照情報30は、データベース参照フォワーディング部15によって一度読み取られると、一つのパケットの転送に使用した参照情報ごとに一つのキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)に書き込まれる。図示する例では、参照情報30−1と、30−4と、30−5は、一つのパケットの転送処理においてソースアドレスの処理時に参照される参照情報であるため、t個のキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)のうちの一つであるキャッシュブロック4(210−4)に書き込まれる。また、参照情報30−2と、30−3と、30−6は、一つのパケットの転送処理においてデスティネーションアドレスの処理時に参照される参照情報であるため、t個のキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)のうちの一つであるキャッシュブロックt−1(210−t−1)に書き込まれる。   When the reference information 30 stored in the database 1 (521-1) to the database n (521-n) is read once by the database reference forwarding unit 15, one cache block is provided for each reference information used for transferring one packet. 1 (210-1) to cache block t (210-t). In the illustrated example, the reference information 30-1, 30-4, and 30-5 are reference information that is referred to when processing the source address in the transfer processing of one packet, and therefore, t cache blocks 1 ( 210-1) to cache block 4 (210-4) which is one of the cache blocks t (210-t). The reference information 30-2, 30-3, and 30-6 are reference information that is referred to when processing the destination address in the transfer processing of one packet, and therefore, t cache blocks 1 (210- 1) to cache block t-1 (210-t-1), which is one of the cache blocks t (210-t).

次に、パケット転送装置の動作手順について図6および図7を参照して説明する。図6および図7はパケット転送装置の動作手順について示したフローチャートである。はじめにフィールド抽出部11は入出力ポート3より入力されたパケットよりフォワーディングに関連するフィールドを抽出する(ステップS101)。インデックス計算部12はステップS101で抽出したフィールドの値から所定のハッシュ関数を用いてハッシュ値(1)を計算する(ステップS102)。インデックス計算部12はステップS102で計算したハッシュ値(1)に基づいてインデックスを計算し、インデックスに基づいてキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)を特定する。検証情報格納部13は、インデックス計算部12が特定したキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)に検証情報が存在するか否か検索する(ステップS103)。検証情報格納部13はステップS103で特定したキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)に検証情報が存在するか否か判断し(ステップS104)、検証情報(2)が存在する場合はステップS105に進み、存在しない場合はステップS108に進む。   Next, the operation procedure of the packet transfer apparatus will be described with reference to FIG. 6 and FIG. 6 and 7 are flowcharts showing the operation procedure of the packet transfer apparatus. First, the field extraction unit 11 extracts a field related to forwarding from a packet input from the input / output port 3 (step S101). The index calculation unit 12 calculates a hash value (1) from the field values extracted in step S101 using a predetermined hash function (step S102). The index calculation unit 12 calculates an index based on the hash value (1) calculated in step S102, and identifies cache block 1 (210-1) to cache block t (210-t) based on the index. The verification information storage unit 13 searches whether or not verification information exists in the cache block 1 (210-1) to the cache block t (210-t) specified by the index calculation unit 12 (step S103). The verification information storage unit 13 determines whether or not the verification information exists in the cache block 1 (210-1) to the cache block t (210-t) specified in step S103 (step S104), and the verification information (2) is determined. When it exists, it progresses to step S105, and when it does not exist, it progresses to step S108.

ステップS105では、検証部14はステップS104で存在した検証情報と、ステップS102で抽出したフィールド(検証情報)とに基づいて、検索した検証情報が含まれるキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)の情報が転送対象のパケットに対して有効か否か確認する(ステップS105)。ステップS105でキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)の情報が有効と判断した場合はステップS107に進み、無効と判断した場合はステップS108に進む(ステップS106)。ステップS107では、キャッシュ参照フォワーディング部16は、ステップS103で特定したキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)に含まれる情報のうち、処理情報(3)に基づいて転送対象のパケットを加工し、処理情報(3)に記録された出力ポートに、処理情報(3)に記録されたパラメータで転送対象のパケットの送出制御を行い(ステップS107)、処理を終了する。   In step S105, the verification unit 14 executes cache block 1 (210-1) to cache block including the verification information searched based on the verification information existing in step S104 and the field (verification information) extracted in step S102. It is confirmed whether or not the information of t (210-t) is valid for the transfer target packet (step S105). If it is determined in step S105 that the information of the cache block 1 (210-1) to the cache block t (210-t) is valid, the process proceeds to step S107, and if it is determined to be invalid, the process proceeds to step S108 (step S106). In step S107, the cache reference forwarding unit 16 performs transfer based on the processing information (3) among the information included in the cache block 1 (210-1) to the cache block t (210-t) specified in step S103. The packet to be transferred is controlled to the output port recorded in the processing information (3) using the parameters recorded in the processing information (3) (step S107), and the processing is terminated.

一方、ステップS108では、検証情報格納部13は新たなキャッシュブロック(4)であるキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)を確保する(ステップS108)。データベース参照フォワーディング部15は、転送対象のパケットのヘッダ部を解析し、解析した情報に基づいてデータベース1(521−1)〜データベースn(521−n)より参照情報を読み取り、参照情報に基づいてパケットを加工し、加工したパケットを送信パケット21として出力ポートに送出する。また、データベース参照フォワーディング部15はこの過程で読み取った複数の参照情報を一つにまとめて、一つの処理情報としてステップS108で確保したキャッシュブロック(4)に記憶させる(ステップS109)。データベース参照フォワーディング部15は、ステップS109で処理情報を記憶させたキャッシュブロック(4)を、ステップS102で計算したハッシュ値(1)に基づいてステップS103で計算したインデックスで登録し(ステップS110)、処理を終了する。   On the other hand, in step S108, the verification information storage unit 13 secures cache blocks 1 (210-1) to t (210-t), which are new cache blocks (4) (step S108). The database reference forwarding unit 15 analyzes the header part of the packet to be transferred, reads the reference information from the database 1 (521-1) to the database n (521-n) based on the analyzed information, and based on the reference information The packet is processed, and the processed packet is sent to the output port as a transmission packet 21. Further, the database reference forwarding unit 15 collects a plurality of pieces of reference information read in this process into one and stores them as one piece of processing information in the cache block (4) secured in step S108 (step S109). The database reference forwarding unit 15 registers the cache block (4) in which the processing information is stored in step S109 with the index calculated in step S103 based on the hash value (1) calculated in step S102 (step S110). The process ends.

上述したとおり、フォワーディング部17は、初めて転送するパケットについては、パケットの転送に必要な複数の参照情報をデータベース1(521−1)〜データベースn(521−n)より読み取り、読み取った情報に基づいてパケットを転送するが、その際に読み取った複数の参照情報を一つにまとめ、一つの処理情報としてキャッシュブロックに記憶させ、再度同じ特徴を持ったパケットの転送処理の際には、一つのキャッシュブロックが記憶する処理情報に基づいて転送処理を行う。   As described above, the forwarding unit 17 reads a plurality of reference information necessary for packet transfer from the database 1 (521-1) to the database n (521-n) for the packet to be transferred for the first time, and based on the read information. The packet is transferred to the cache block, and the reference information read at that time is combined into one process and stored in the cache block as a single process information. Transfer processing is performed based on the processing information stored in the cache block.

データベースとキャッシュブロックはRAM上に記憶されており、同一アクセス速度でCPUが直接アクセスすることができる同一のアドレス空間に存在する。ただし、各キャッシュブロックはRAM上にアドレスが連続するように記憶されている。同一の内容を読み取る場合、一つのキャッシュブロックからの連続した読み込みは、複数のデータベースからの読み込みよりも速い。これは以下の要因などによる。   The database and the cache block are stored on the RAM and exist in the same address space that can be directly accessed by the CPU at the same access speed. However, each cache block is stored on the RAM so that the addresses are continuous. When reading the same content, consecutive reads from one cache block are faster than reads from multiple databases. This is due to the following factors.

CPU内部キャッシュを備えたCPUは、パケット転送処理を行う上で最初に使用するデータをRAM上から読み込むと、そのデータのアドレスに隣接したアドレスで指定されるデータをCPU内部キャッシュのラインサイズ単位でまとめてCPU内部キャッシュに格納する。本実施形態で、パケット転送処理に必要なデータをキャッシュブロックから読み込む場合には、目的とするデータがRAM上の所定の範囲内(例えば、CPU内部キャッシュのラインサイズに対応する範囲内)にかたまって存在しているため、次に使用するデータは最初に使用するデータと一緒にCPU内部キャッシュに格納される確率が高い。従って、パケット転送処理に必要なデータがRAM上の連続したアドレスで指定される領域に記録されていないとき、すなわちアドレスの分散している複数のデータベースからデータを読み込む場合と比較すると、一つのキャッシュブロックからデータを読み込むほうが読み込み速度は速くなる。
なお、CPU内部キャッシュのラインサイズとキャッシュブロックのサイズが一致する場合はさらに読み込みが速くなる。例えば、CPU内部キャッシュのラインサイズが128バイトで、キャッシュブロックのサイズが128バイトであって、且つアドレス上の所定の境界内に一つのキャッシュブロックが収まるようにキャッシュブロックを配置させることにより、一つのキャッシュブロックのデータがCPU内部キャッシュに全て記憶されるため、さらに読み込みが速くなる。
When a CPU having a CPU internal cache reads data used for the first time from the RAM in performing packet transfer processing, the data specified by the address adjacent to the address of the data is read in units of the line size of the CPU internal cache. Collectively store in the CPU internal cache. In this embodiment, when data necessary for packet transfer processing is read from a cache block, the target data is accumulated within a predetermined range on the RAM (for example, within a range corresponding to the line size of the CPU internal cache). Therefore, there is a high probability that the next data to be used is stored in the CPU internal cache together with the first data to be used. Therefore, when the data required for packet transfer processing is not recorded in the area designated by the continuous addresses on the RAM, that is, compared with the case where data is read from a plurality of databases with distributed addresses, one cache is used. Reading data from the block is faster.
If the line size of the CPU internal cache matches the size of the cache block, reading is further accelerated. For example, the CPU internal cache has a line size of 128 bytes, the cache block size is 128 bytes, and the cache block is arranged so that one cache block fits within a predetermined boundary on the address. Since all the data of one cache block is stored in the CPU internal cache, the reading speed is further increased.

また、RAM上の連続したアドレスで指定される領域に記憶されているデータは、バースト転送により高速なデータ転送を行うことができる。バースト転送では、CPUは最初に読み取り先のアドレス情報をRAMに対して一回だけ送信する。その後、送信したアドレス付近のデータがRAMからCPUに連続して転送される。よって一回のデータ転送ごとに一回ずつアドレス情報を送信する方法と比べると、バースト転送ではアドレス情報の送信にかかる時間を大幅に減らすことができる。そのため、CPUがRAM上から連続したアドレスに記憶されるデータ、すなわち一つのキャッシュブロックに記憶されるデータを連続して読み取る際にはバースト転送が効果を発揮するため、連続していないアドレスに記憶されるデータ、すなわち複数のデータベースに存在しているデータを読み取る場合に比べて参照情報を速く読み出せる。   Also, data stored in an area designated by consecutive addresses on the RAM can be transferred at high speed by burst transfer. In burst transfer, the CPU first transmits read address information to the RAM only once. Thereafter, data near the transmitted address is continuously transferred from the RAM to the CPU. Therefore, in comparison with the method in which address information is transmitted once for each data transfer, the time required for transmitting address information can be significantly reduced in burst transfer. Therefore, when the CPU continuously reads data stored at consecutive addresses from the RAM, that is, data stored in one cache block, burst transfer is effective, so it is stored at non-contiguous addresses. The reference information can be read faster than the case where the read data, that is, the data existing in a plurality of databases is read.

上述したとおり、本発明を利用したパケット転送処理と、利用していないパケット転送処理とを比較すると、本発明を利用したパケット転送処理では、参照データを高速に読み出すことができる。その結果、従来、パケット転送処理のボトルネックとなっていた参照情報の読み出しが速くなり、パケット転送処理も速くなる。   As described above, when packet transfer processing using the present invention is compared with packet transfer processing not using the packet transfer processing using the present invention, reference data can be read at high speed. As a result, the reading of reference information, which has conventionally been a bottleneck of packet transfer processing, is accelerated, and the packet transfer processing is also accelerated.

次に、上述したパケット転送装置におけるデータベース1(521−1)〜データベースn(521−n)のエントリが持つカウンタの管理手法について図を参照して説明する。図8は本実施形態におけるカウンタの管理手法について説明したブロック図である。上述したパケット転送装置は、データベース1(521−1)〜データベースn(521−n)のエントリが持つカウンタを管理する手段として、以下に述べるカウンタ情報更新部を有している。   Next, a management method of counters included in the entries of the database 1 (521-1) to the database n (521-n) in the packet transfer apparatus described above will be described with reference to the drawings. FIG. 8 is a block diagram illustrating a counter management method in the present embodiment. The packet transfer apparatus described above has a counter information update unit described below as means for managing the counters of the entries in the database 1 (521-1) to the database n (521-n).

パケットのフォワーディング処理では、データベース1(521−1)〜データベースn(521−n)を参照するだけではなく、フォワーディングしたパケットに関する統計情報を記録する必要がある。統計情報(カウンタ)はフォワーディング処理でデータベース1(521−1)〜データベースn(521−n)を参照した際に、参照されたデータベース1(521−1)〜データベースn(521−n)のいずれかのエントリに記録される。エントリはデータベース1(521−1)〜データベースn(521−n)内に複数存在し、図示する例ではデータベース1(521−1)のエントリ数はm1個、データベース2(521−2)のエントリ数はm2個である。また、エントリの各々はカウンタ(第一の統計情報)を持つ。しかし、本実施形態では、参照情報が処理情報に含まれた状態でキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)に記憶されている場合、フォワーディング処理はキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)の情報に基づいて行われるため、データベース1(521−1)〜データベースn(521−n)のエントリにアクセスすることなくフォワーディング処理が実施される。そのため、カウンタ管理方法を考慮しなければデータベース1(521−1)〜データベースn(521−n)のエントリに統計情報を記録することが出来ない。 In the packet forwarding process, it is necessary not only to refer to the database 1 (521-1) to the database n (521-n) but also to record statistical information regarding the forwarded packet. The statistical information (counter) is any of the database 1 (521-1) to the database n (521-n) referred to when the database 1 (521-1) to the database n (521-n) are referred to in the forwarding process. Is recorded in the entry. There are a plurality of entries in the database 1 (521-1) to the database n (521-n). In the illustrated example, the number of entries in the database 1 (521-1) is m 1 and the number of entries in the database 2 (521-2) The number of entries is m 2 . Each entry has a counter (first statistical information). However, in this embodiment, when the reference information is included in the processing information and stored in the cache block 1 (210-1) to the cache block t (210-t), the forwarding process is performed in the cache block 1 (210 -1) to the cache block t (210-t), the forwarding process is performed without accessing the entries of the database 1 (521-1) to the database n (521-n). Therefore, statistical information cannot be recorded in the entries of the database 1 (521-1) to the database n (521-n) unless the counter management method is taken into consideration.

本発明でのカウンタ管理方法は以下の通りである。キャッシュブロック1(210−1)〜キャッシュブロックt(210−t)の各々はカウンタ(第二の統計情報)を持つ。キャッシュ参照フォワーディング部16は、キャッシュブロック1(210−1)〜キャッシュブロックt(210−t)の情報に基づいてパケットのフォワーディング処理を実施した場合、アクセスしたキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)のカウンタをカウントアップする。図示する例では、キャッシュ参照フォワーディング部16がパケットAのフォワーディング処理を行う場合、キャッシュブロック1の処理情報を読み取る。その時にキャッシュ参照フォワーディング部16は参照したキャッシュブロック1(210−1)のカウンタをカウントアップする。パケットBのフォワーディング処理の場合についても同様である。   The counter management method in the present invention is as follows. Each of the cache block 1 (210-1) to the cache block t (210-t) has a counter (second statistical information). When the packet reference forwarding unit 16 performs the packet forwarding process based on the information of the cache block 1 (210-1) to the cache block t (210-t), the cache reference forwarding unit 16 accesses the cache block 1 (210-1) to the cache The counter of block t (210-t) is counted up. In the illustrated example, when the cache reference forwarding unit 16 performs the forwarding process of the packet A, the processing information of the cache block 1 is read. At that time, the cache reference forwarding unit 16 counts up the counter of the referenced cache block 1 (210-1). The same applies to the forwarding process for packet B.

一方、カウンタ情報更新部は周期処理でキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)の第二の統計情報を読み取り、キャッシュブロック1(210−1)〜キャッシュブロックt(210−t)が記憶する処理情報に含まれた参照情報を記憶する、データベース1(521−1)〜データベースn(521−n)のエントリの第一の統計情報に、キャッシュブロック1(210−1)〜キャッシュブロックt(210−t)の第二の統計情報を加え、その後キャッシュブロック1(210−1)〜キャッシュブロックt(210−t)の第二の統計情報をクリアする。また、キャッシュブロック1(210−1)〜キャッシュブロックt(210−t)が削除される場合においても同様の処理を行い、キャッシュブロック1(210−1)〜キャッシュブロックt(210−t)が記憶する第二の統計情報をエントリの第一の統計情報に加える。   On the other hand, the counter information update unit reads the second statistical information of the cache block 1 (210-1) to the cache block t (210-t) by the periodic process, and the cache block 1 (210-1) to the cache block t (210). -T) stores the reference information included in the processing information stored therein, the first statistical information of the entries of the database 1 (521-1) to the database n (521-n) stores the cache block 1 (210-1). ) To the second statistical information of the cache block t (210-t), and then the second statistical information of the cache block 1 (210-1) to the cache block t (210-t) is cleared. The same processing is performed when cache block 1 (210-1) to cache block t (210-t) are deleted, and cache block 1 (210-1) to cache block t (210-t) The second statistical information to be stored is added to the first statistical information of the entry.

上述したとおり、本実施形態によれば、データベース1(521−1)〜データベースn(521−n)のエントリにアクセスすることなくフォワーディング処理が実施される場合においても、データベース1(521−1)〜データベースn(521−n)のエントリに統計情報を記録することができる。   As described above, according to the present embodiment, even when the forwarding process is performed without accessing the entries of the database 1 (521-1) to the database n (521-n), the database 1 (521-1). ~ Statistical information can be recorded in an entry of database n (521-n).

次に、上述したパケット転送装置におけるデータベース1(521−1)〜データベースn(521−n)の各エントリが持つエージング情報(第一のエージング情報、第一の有効時刻)の更新方法について図を参照して説明する。図9は本実施形態におけるエージング処理方法について説明したブロック図である。上述したパケット転送装置は、データベース1(521−1)〜データベースn(521−n)のエントリの有効性を管理する手段として、以下に述べるエージング情報更新部を有している。また、キャッシュブロック1(210−1)〜キャッシュブロックt(210−t)の各々は第二のエージング情報を持つ。   Next, a method for updating the aging information (first aging information, first valid time) of each entry of the database 1 (521-1) to the database n (521-n) in the packet transfer apparatus described above will be described. The description will be given with reference. FIG. 9 is a block diagram illustrating an aging processing method according to this embodiment. The packet transfer apparatus described above has an aging information update unit described below as means for managing the validity of entries in the database 1 (521-1) to the database n (521-n). Each of the cache block 1 (210-1) to the cache block t (210-t) has second aging information.

パケット転送装置は、動的に収集されるデータベース1(521−1)〜データベースn(521−n)のエントリに関して、そのエントリの有効性をエージングという処理で管理する場合がある。この処理は、パケットの転送処理時にそのパケットによって特定のデータベース1(521−1)〜データベースn(521−n)のエントリが有効であることが確認された場合、その確認された時刻をデータベース1(521−1)〜データベースn(521−n)のエントリに記録し、一定時間内に有効であることが確認されなかった場合、そのデータベース1(521−1)〜データベースn(521−n)のエントリを自動的に削除する処理である。   The packet transfer apparatus may manage the validity of entries of database 1 (521-1) to database n (521-n) that are dynamically collected by a process called aging. In this process, when it is confirmed that the entry of the specific database 1 (521-1) to the database n (521-n) is valid by the packet during the packet transfer process, the confirmed time is set to the database 1 (521-1) to database n (521-n) are recorded in the entries, and when it is not confirmed that they are valid within a predetermined time, the database 1 (521-1) to database n (521-n) This process automatically deletes the entry.

しかし、本実施形態では、参照情報が処理情報に含まれた状態でキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)に記憶されている場合、フォワーディング処理はキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)の情報に基づいて行われるため、データベース1(521−1)〜データベースn(521−n)のエントリにアクセスすることなくフォワーディング処理が実施される。そのため、有効であると確認された場合においても確認された時刻をデータベース1(521−1)〜データベースn(521−n)のエントリに記録することが出来ないため、有効であるデータベース1(521−1)〜データベースn(521−n)のエントリについても自動的に削除されてしまう。   However, in this embodiment, when the reference information is included in the processing information and stored in the cache block 1 (210-1) to the cache block t (210-t), the forwarding process is performed in the cache block 1 (210 -1) to the cache block t (210-t), the forwarding process is performed without accessing the entries of the database 1 (521-1) to the database n (521-n). For this reason, even when it is confirmed to be valid, the confirmed time cannot be recorded in the entries of the database 1 (521-1) to the database n (521-n). -1) to database n (521-n) entries are automatically deleted.

本発明でのエージング処理は以下の通りである。キャッシュブロック1(210−1)〜キャッシュブロックt(210−t)の情報に基づいてキャッシュ参照フォワーディング部16がパケットのフォワーディング処理を実施した場合、キャッシュ参照フォワーディング部16はアクセスしたキャッシュブロック1(210−1)〜キャッシュブロックt(210−t)の第二の有効時刻(第二のエージング情報)に、キャッシュブロックを参照した時刻を記録する。図示する例では、キャッシュ参照フォワーディング部16がパケットAのフォワーディング処理を行う場合、キャッシュ参照フォワーディング部16はキャッシュブロック1(210−1)の第二の処理情報を読み取る。その時にキャッシュ参照フォワーディング部16は、キャッシュブロック1を参照した際に内部時計から取得した現在時刻を、キャッシュブロック1(210−1)の第二の有効時刻に記録する。パケットBのフォワーディング処理についても、キャッシュ参照フォワーディング部16は、パケットAについてと同様の処理を行う。   The aging process in the present invention is as follows. When the cache reference forwarding unit 16 performs the packet forwarding process based on the information of the cache block 1 (210-1) to the cache block t (210-t), the cache reference forwarding unit 16 accesses the cache block 1 (210 -1) to the second valid time (second aging information) of the cache block t (210-t), the time referring to the cache block is recorded. In the illustrated example, when the cache reference forwarding unit 16 performs the forwarding process for the packet A, the cache reference forwarding unit 16 reads the second processing information of the cache block 1 (210-1). At that time, the cache reference forwarding unit 16 records the current time acquired from the internal clock when referring to the cache block 1 at the second valid time of the cache block 1 (210-1). Regarding the forwarding process for packet B, the cache reference forwarding unit 16 performs the same process as for packet A.

一方、エージング情報更新部は、周期処理でキャッシュブロック1(210−1)の第二の有効時刻を読み取り、第二の有効時刻とキャッシュブロック1(210−1)に関連するエントリが有する第一の有効時刻とを比較する。第二の有効時刻の方が新しければ、エージング情報更新部は第一の有効時刻を第二の有効時刻の値に書き換える。その後エージング情報更新部はキャッシュブロック1(210−1)の第二の有効時刻をクリアする。キャッシュブロック2(210−2)〜キャッシュブロックt(210−t)についても、エージング情報更新部は、キャッシュブロック1についてと同様の処理を行う。   On the other hand, the aging information update unit reads the second valid time of the cache block 1 (210-1) by the periodic process, and the first valid time and the entries related to the cache block 1 (210-1) have the first Compare the effective time of. If the second valid time is newer, the aging information update unit rewrites the first valid time with the value of the second valid time. Thereafter, the aging information update unit clears the second valid time of the cache block 1 (210-1). For the cache block 2 (210-2) to the cache block t (210-t), the aging information update unit performs the same processing as that for the cache block 1.

上述したとおり、本実施形態によれば、データベース1(521−1)〜データベースn(521−n)のエントリにアクセスすることなくフォワーディング処理が実施される場合においても、データベース1(521−1)〜データベースn(521−n)のエージング処理を行うことができる。   As described above, according to the present embodiment, even when the forwarding process is performed without accessing the entries of the database 1 (521-1) to the database n (521-n), the database 1 (521-1). ~ Aging processing of database n (521-n) can be performed.

次に、上述したパケット転送装置におけるデータベースのエントリおよびキャッシュ(cache)のエントリの情報を管理し維持する手法について説明する。上述したパケット転送装置は、データベースのエントリおよびキャッシュのエントリを管理する手段として、以下に述べる情報管理装置を有している。   Next, a technique for managing and maintaining information on database entries and cache entries in the packet transfer apparatus described above will be described. The packet transfer apparatus described above has an information management apparatus described below as means for managing database entries and cache entries.

図10は、本実施形態による情報管理装置のハードウェア構成を示す概略ブロック図である。図示するように、この情報管理装置501は、CPU(中央処理装置、Central Processing Unit)502と、半導体RAM(半導体により構成される読み書き可能なランダムアクセスメモリ)503と、バス504を含んで構成される。CPU・502と半導体RAM・503とはそれぞれバス504に接続されており、CPU・502からはバス504を介して半導体RAM・503からデータを読み出したり、半導体RAM・503にデータを書き込んだりすることができるようになっている。バス504には、他の構成要素も接続されているが、ここでは記載を省略する。半導体RAM・503の内部には、実行形式のコンピュータプログラムコードが記憶されている領域と処理対象のデータが記憶されている領域が含まれる。CPU・502は、内部に有するプログラムカウンタの値に基づいて適宜、半導体RAM・503の所定のアドレスからプログラムコードを読み出して実行する。このようなコンピュータプログラムを用いることにより、以下に述べる情報管理の機能が実現される。   FIG. 10 is a schematic block diagram illustrating a hardware configuration of the information management apparatus according to the present embodiment. As shown in the figure, the information management apparatus 501 includes a CPU (Central Processing Unit) 502, a semiconductor RAM (Read / Write Random Access Memory comprised of a semiconductor) 503, and a bus 504. The The CPU 502 and the semiconductor RAM 503 are respectively connected to the bus 504, and the CPU 502 reads data from the semiconductor RAM 503 via the bus 504 and writes data to the semiconductor RAM 503. Can be done. Although other components are also connected to the bus 504, description thereof is omitted here. The semiconductor RAM 503 includes an area in which execution-type computer program code is stored and an area in which data to be processed is stored. The CPU 502 reads out and executes the program code from a predetermined address of the semiconductor RAM 503 as appropriate based on the value of the program counter included therein. By using such a computer program, the information management function described below is realized.

図11は、情報管理装置501の機能構成を示す概略機能ブロック図である。図示するように、情報管理装置501は、内部に、関連性有効化処理部511と、関連性無効化処理部512と、ガーベジ収集処理部513と、記憶部514を含んで構成される。記憶部514は、データを記憶する機能を有しており、上記の半導体RAM・503によって実現される。関連性有効化処理部511や関連性無効化処理部512やガーベジ収集処理部513は、上記のCPU・502がコンピュータプログラムを実行することにより実現される。   FIG. 11 is a schematic functional block diagram showing a functional configuration of the information management apparatus 501. As illustrated, the information management apparatus 501 includes a relevance validation processing unit 511, a relevance invalidation processing unit 512, a garbage collection processing unit 513, and a storage unit 514. The storage unit 514 has a function of storing data, and is realized by the semiconductor RAM 503 described above. The relevance validation processing unit 511, the relevance invalidation processing unit 512, and the garbage collection processing unit 513 are realized by the CPU 502 executing the computer program.

関連性有効化処理部511(関連性有効化処理過程)は、データベースエントリ(情報エントリ)に関連するキャッシュブロック(関連情報エントリ)を有効にする際に、当該データベースエントリ(情報エントリ)と当該キャッシュブロック(関連情報エントリ)との間に関連があることを表わすキャッシュブロックポインタ(関連性情報)を含んだオブジェクト(関連オブジェクト)を生成するとともに、当該キャッシュブロック(関連情報エントリ)の世代番号(522−1、世代情報)と同一の世代情報を当該オブジェクト(関連オブジェクト)の世代番号(527−1、世代情報)として書き込む処理を行なう機能を有するものである。
関連性無効化処理部512(関連性無効化処理過程)は、データベースエントリ(情報エントリ)のいずれかが変更されたときに、変更された当該データベースエントリ(情報エントリ)に関連するキャッシュブロック(関連情報エントリ)を無効にする処理をするとともに、当該キャッシュブロック(関連情報エントリ)の世代番号(522−1、世代情報)を更新する処理を行なう機能を有するものである。
ガーベジ収集処理部513(ガーベジ収集処理過程)は、オブジェクト(関連オブジェクト)が有する世代番号(527−1、世代情報)と、当該オブジェクト(関連オブジェクト)に対応するキャッシュブロック(関連情報エントリ)が有する世代番号(522−1、世代情報)とを比較し、この比較結果に応じて当該オブジェクト(関連オブジェクト)を回収する(つまり、不要となっているオブジェクトを収集(回収)する機能を有するものである。
The relevance validation processing unit 511 (relevance validation process), when validating a cache block (related information entry) related to a database entry (information entry), the database entry (information entry) and the cache An object (related object) including a cache block pointer (relevance information) indicating that there is a relationship with a block (related information entry) is generated, and the generation number (522) of the cache block (related information entry) −1, generation information) has a function of performing the process of writing the same generation information as the generation number (527-1, generation information) of the object (related object).
The relevance invalidation processing unit 512 (relevance invalidation processing step), when any of the database entries (information entries) is changed, the cache block (relevance) related to the changed database entry (information entry) The information entry) has a function of invalidating and updating the generation number (522-1, generation information) of the cache block (related information entry).
The garbage collection processing unit 513 (garbage collection process) has a generation number (527-1, generation information) of an object (related object) and a cache block (related information entry) corresponding to the object (related object). It has a function of comparing the generation number (522-1, generation information) and collecting the object (related object) according to the comparison result (that is, collecting (collecting) unnecessary objects). is there.

次に、情報管理装置501が管理の対象とするデータの構成および構造について説明する。図12は、情報管理装置501が管理するデータ構造の一例を概念的に表わす概略図である。この図は、データ構造を単に概念的に表わしているに過ぎず、実際の、本実施形態の情報管理装置501における物理的なデータ構造については後述する。図12において、符号521−1、521−2、・・・、521−nは、n個のデータベース(第1記憶部)である。また、符号522は、キャッシュブロック群(第2記憶部)である。データベース1(521−1)は、エントリ1からエントリm1までのm1個のデータエントリ(情報エントリ)を有している。データベース2(521−2)は、エントリ1からエントリm2までのm2個のデータエントリを有している。以下、同様に続き、データベースn(521−n)は、エントリ1からエントリmnまでのmn個のデータエントリを有している。一方、キャッシュブロック群522は、キャッシュブロック1からキャッシュブロックtまでのt個のキャッシュブロック(関連情報エントリ)を有している。図中の矢印線は、それぞれ、データベースのエントリからキャッシュブロックへの関連を表わすものである。図示する例では、例えば、データベース1(521−1)のエントリ2は、キャッシュブロック2、キャッシュブロック3、キャッシュブロックtに関連する。また、データベース2(521−2)のエントリ2は、キャッシュブロック2に関連する。また、データベース2(521−2)のエントリm2は、キャッシュブロック1に関連する。また、データベースn(521−n)のエントリ2は、キャッシュブロックtに関連する。また、データベースn(521−n)のエントリmnは、キャッシュブロック3に関連する。 Next, the configuration and structure of data to be managed by the information management apparatus 501 will be described. FIG. 12 is a schematic diagram conceptually showing an example of a data structure managed by the information management apparatus 501. This figure merely conceptually represents the data structure, and the actual physical data structure in the information management apparatus 501 of this embodiment will be described later. In FIG. 12, reference numerals 521-1, 521-2, ..., 521-n denote n databases (first storage units). Reference numeral 522 denotes a cache block group (second storage unit). Database 1 (521-1) has m 1 data entries (information entries) from entry 1 to entry m 1 . The database 2 (521-2) has m 2 data entries from entry 1 to entry m 2 . In the same manner, database n (521-n) has mn data entries from entry 1 to entry mn . On the other hand, the cache block group 522 has t cache blocks (related information entries) from the cache block 1 to the cache block t. Each arrow line in the figure represents a relation from a database entry to a cache block. In the illustrated example, for example, entry 2 of database 1 (521-1) is associated with cache block 2, cache block 3, and cache block t. Also, entry 2 of database 2 (521-2) is associated with cache block 2. The entry m 2 in the database 2 (521-2) is related to the cache block 1. In addition, entry 2 of database n (521-n) relates to cache block t. Further, the entry m n of the database n (521-n) is related to the cache block 3.

図12に示した例のように、あるデータベースエントリが複数のキャッシュブロックに関連する場合がある。また、複数のデータベースエントリが、ひとつのキャッシュブロックに関連する場合がある。つまり、データベースエントリとキャッシュブロックとの関連は、多対多(図示する例では、(m1+m2+・・・+mn)対t)の関係にある。 As in the example shown in FIG. 12, a database entry may be associated with a plurality of cache blocks. Also, multiple database entries may be associated with one cache block. That is, the relationship between the database entry and the cache block is a many-to-many relationship (in the example shown, (m 1 + m 2 +... + M n ) vs. t).

ところで、前述の通り、本実施形態では、データベース(521−1〜521−n)は、パケット転送装置がパケット転送する際に参照する必要のある各種データを保持している。また、あるパケットを転送する際に必要となる情報が各データベースにばらばらに分散して存在しているとそれらのデータを読み出すのに時間がかかるため、各々のキャッシュブロックは、あるパケットを転送する際に必要となる情報をまとめて局所的な場所に保持しておくためのものである。
つまり、パケット転送装置を運用するとき、データベースエントリは、オペレータによる設定操作の結果として、あるいはルーティングプロトコルのやりとりの結果として、あるいはブリッジのFDB学習の結果として、変更されることがある。
Incidentally, as described above, in the present embodiment, the database (521-1 to 521-n) holds various data that need to be referred to when the packet transfer apparatus performs packet transfer. In addition, if the information necessary to transfer a packet is scattered and present in each database, it takes time to read the data, so each cache block transfers a packet. This is to keep all the information necessary at the time in a local place.
That is, when the packet transfer apparatus is operated, the database entry may be changed as a result of a setting operation by an operator, as a result of exchange of a routing protocol, or as a result of FDB learning of a bridge.

データベースエントリが変更されると、そのデータベースエントリに対応する、変更前の値を保持するキャッシュブロックは、値の不整合が起こってしまうのを避けるために、削除するないしは無効にするなど、参照されないようにする必要がある。上記の通り、あるキャッシュブロックは、複数のデータベースエントリから抽出した情報から構成される。また上記の通り、あるデータベースエントリは、複数のキャッシュブロックに関連している。これは、あるキャッシュブロック、複数のデータベースエントリに依存していると言い換えることもできる。つまり、データベースエントリとキャッシュブロックの間には、多対多の依存関係がある。   When a database entry is changed, the cache block that holds the old value corresponding to the database entry is not referenced, such as deleted or invalidated, in order to avoid inconsistent values. It is necessary to do so. As described above, a certain cache block includes information extracted from a plurality of database entries. As described above, a certain database entry is associated with a plurality of cache blocks. In other words, it depends on a certain cache block and a plurality of database entries. That is, there is a many-to-many dependency between database entries and cache blocks.

次に、情報管理装置501が管理するデータの具体的な構造について、図13、図14、図15を参照しながら説明する。   Next, a specific structure of data managed by the information management apparatus 501 will be described with reference to FIGS. 13, 14, and 15. FIG.

図13は、データベースとキャッシュブロックとの間の関連付けを表わすデータ構造を示した概略図である。この図において、データベース1(521−1、第1記憶部)はm1個のエントリ(情報エントリ)を有し、キャッシュブロック群522(第2記憶部)はt個のエントリ(関連情報エントリ)を有している。また、符号526はオブジェクトハッシュであり、このオブジェクトハッシュ526はスロット1からスロットxまでのx個のスロットを有している。データベース1(521−1)のエントリは、オブジェクトハッシュ526のスロットに関連付けられる。この関連付けの方法としては、様々な方法が考えられるが、例えば、データベース1(521−1)のエントリに固有な値(当該エントリが存在するアドレスや、当該エントリのデータのキー値など)を基に所定の関数(ハッシュ関数など)の計算を行なうことによりスロット1からスロットxまでのいずれかのスロットに関連付ける方法がある。また、ハッシュ関数を用いた場合、データベース1(521−1)の複数のエントリに対応するハッシュ値が同一になってしまう場合もあるが、これを解決するためには例えば、一つのハッシュ値に対して複数のスロットを割り当てて適宜使用する方法がある。 FIG. 13 is a schematic diagram showing a data structure representing an association between a database and a cache block. In this figure, database 1 (521-1, first storage unit) has m 1 entries (information entries), and cache block group 522 (second storage unit) has t entries (related information entries). have. Reference numeral 526 denotes an object hash, and this object hash 526 has x slots from slot 1 to slot x. The entry of database 1 (521-1) is associated with the slot of object hash 526. Various methods can be considered as this association method. For example, based on values specific to the entry of the database 1 (521-1) (such as an address where the entry exists and a key value of data of the entry). There is a method of associating with any slot from slot 1 to slot x by calculating a predetermined function (such as a hash function). In addition, when a hash function is used, hash values corresponding to a plurality of entries in the database 1 (521-1) may be the same. To solve this, for example, a single hash value is used. On the other hand, there is a method of assigning a plurality of slots and using them appropriately.

符号527はオブジェクト(関連オブジェクト)であり、このオブジェクト527は、一つのスロットから複数のキャッシュブロックへの関連付けを行なうための構造体である。オブジェクト527は、メモリ上のオブジェクト記憶部(関連オブジェクト記憶部)に記憶される。オブジェクトハッシュ526内の各スロットは、一つのオブジェクト527へのポインタを有している。また、一つのオブジェクト527は、一つのキャッシュブロックへのポインタと、次の一つのオブジェクト527へのポインタを有している。つまり、一つのスロットのポインタは、複数のオブジェクト527からなるリストの先頭を指し示す。このリストの終端のオブジェクト527においては、次のオブジェクトへのポインタは「ヌル(null)」にセットされている。また、このリストに属する各オブジェクト527は、それぞれ一つのキャッシュブロックを指し示している。つまり、一つのスロットから複数のキャッシュブロックへの関連付けが行なわれている。   Reference numeral 527 denotes an object (related object), and this object 527 is a structure for associating one slot with a plurality of cache blocks. The object 527 is stored in an object storage unit (related object storage unit) on the memory. Each slot in the object hash 526 has a pointer to one object 527. One object 527 has a pointer to one cache block and a pointer to the next one object 527. That is, the pointer of one slot points to the head of a list composed of a plurality of objects 527. In the object 527 at the end of this list, the pointer to the next object is set to “null”. Each object 527 belonging to this list points to one cache block. That is, the association from one slot to a plurality of cache blocks is performed.

図14は、オブジェクト527の内部データ構造を示す概略図である。図示するように、オブジェクト527は、世代番号527−1(関連性情報に対応する世代を表わす世代情報)と、キャッシュブロックポインタ527−2(関連性情報)と、次のオブジェクトポインタ527−3とを含んで構成される。世代番号527−1は、このオブジェクト527およびこのオブジェクト527から指し示されるキャッシュブロックの更新の世代を管理するためのものであり、関連性有効化処理部511(図11)や関連性無効化処理部512(図11)によって更新される。世代番号527−1の使い方の詳細は、後述する。キャッシュブロックポインタ527−2は、前述の通り一つのキャッシュブロックを指し示すためのポインタである。つまり、キャッシュブロックポインタ527−2は、データベースエントリとキャッシュブロックとの間の関連を表わす。次のオブジェクトポインタ527−3は、前述の通り、リンクリスト上の次のオブジェクト527を指し示すためのポインタである。   FIG. 14 is a schematic diagram showing an internal data structure of the object 527. As illustrated, the object 527 includes a generation number 527-1 (generation information indicating a generation corresponding to the relevance information), a cache block pointer 527-2 (relevance information), and a next object pointer 527-3. It is comprised including. The generation number 527-1 is for managing the generation of this object 527 and the update of the cache block pointed to by this object 527. The relevance validation processing unit 511 (FIG. 11) or the relevance invalidation process Updated by the unit 512 (FIG. 11). Details of how to use the generation number 527-1 will be described later. The cache block pointer 527-2 is a pointer for pointing to one cache block as described above. That is, the cache block pointer 527-2 represents the association between the database entry and the cache block. As described above, the next object pointer 527-3 is a pointer for pointing to the next object 527 on the link list.

図15は、一つのキャッシュブロックの内部データ構造を示す概略図である。図示するように、キャッシュブロックは、世代番号522−1(関連情報エントリに対応する世代を表わす世代情報)と、有効/無効522−2と、検証情報522−3と、処理情報522−4とを含んで構成される。世代番号522−1は、キャッシュブロックの更新の世代を管理するためのものであり、前述の世代番号527−1とともに使用される。世代番号522−1の使い方の詳細は、後述する。有効/無効522−2は、現在、当該キャッシュブロックが有効な情報を有するエントリであるか否かを表わすフラグである。そのフラグの値は適宜設計により決めれば良いが、例えば「1」が有効を表わし、「0」が無効を表わすようにする。検証情報522−3は、例えば、当該キャッシュブロックに対応するキー値(複数のデータベースの複合キー値でも良い)を格納する。この検証情報522−3は、当該キャッシュブロックを参照する際のキー値の検証のために用いられる。処理情報522−4は、上記キー値に対応する情報であり、パケット転送装置が当該キー値に対応するパケットを転送する処理を行なう際に参照する情報である。この処理情報522−4は、複数のデータベース(521−1、521−2、・・・、521−n)に分散している情報を高速に参照できるように一箇所にまとめて保持するための領域である。   FIG. 15 is a schematic diagram showing the internal data structure of one cache block. As shown in the figure, the cache block includes a generation number 522-1 (generation information indicating the generation corresponding to the related information entry), valid / invalid 522-2, verification information 522-3, and processing information 522-4. It is comprised including. The generation number 522-1 is for managing the update generation of the cache block, and is used together with the above-mentioned generation number 527-1. Details of how to use the generation number 522-1 will be described later. The valid / invalid 522-2 is a flag indicating whether or not the cache block is an entry that currently has valid information. The value of the flag may be determined as appropriate by design. For example, “1” represents valid and “0” represents invalid. For example, the verification information 522-3 stores a key value (may be a composite key value of a plurality of databases) corresponding to the cache block. The verification information 522-3 is used for verifying the key value when referring to the cache block. The processing information 522-4 is information corresponding to the key value, and is information that is referred to when the packet transfer apparatus performs a process of transferring a packet corresponding to the key value. This processing information 522-4 is for holding information distributed in a plurality of databases (521-1, 521-2,..., 521-n) in one place so that the information can be referred to at high speed. It is an area.

次に、上で述べたデータ構造を用いた処理について、図16、図17、図18を参照しながら説明する。   Next, processing using the data structure described above will be described with reference to FIG. 16, FIG. 17, and FIG.

図16は、情報管理装置501の関連性有効化処理部511(図11)がデータベースのエントリに対応するキャッシュブロックについて、それら両者間を関連付けて登録する処理の手順を示すフローチャートである。つまり、依存関係を登録する処理の手順を示すフローチャートである。なおこの際、データベースのエントリから関連付ける先のキャッシュブロックについて、情報管理装置501は、検証情報522−3に適切なデータを格納し、処理情報522−4に適切なデータを格納し、有効/無効522−2のフラグが「有効」を表わすように設定し、世代番号522−1に適切な世代番号を格納する処理も適宜行なっている。ここで、世代番号は、例えば、一つのキャッシュブロックを有効にする都度、また無効にする都度、インクリメントしていくような数値を用いる。
データベースを検索してキャッシュブロックに検証情報と処理情報を記録する処理の例は、図6、図7のフローチャート(特に、ステップS109)に示した通りである。
FIG. 16 is a flowchart showing a procedure of processing in which the association validation processing unit 511 (FIG. 11) of the information management apparatus 501 registers the cache blocks corresponding to the database entries in association with each other. That is, it is a flowchart showing a procedure of processing for registering a dependency relationship. At this time, for the cache block to be associated from the database entry, the information management apparatus 501 stores appropriate data in the verification information 522-3, stores appropriate data in the processing information 522-4, and is enabled / disabled. The process of setting the flag 522-2 to indicate “valid” and storing an appropriate generation number in the generation number 522-1 is appropriately performed. Here, for the generation number, for example, a numerical value that is incremented every time one cache block is validated or invalidated is used.
An example of processing for searching the database and recording the verification information and the processing information in the cache block is as shown in the flowcharts of FIGS. 6 and 7 (particularly, step S109).

図16のフローチャートに沿って、関連性有効化処理部511は、まず、ステップS701において、登録すべきデータベースのエントリに固有な値として、当該エントリのメモリ上のアドレス値を用いて、この固有値に基づくハッシュ関数の計算を行ない、得られたハッシュ値により、使用する特定のスロットを決定する(つまり、スロットを計算する)。
次に、ステップS702において、関連性有効化処理部511は、依存関係を保持するための、つまりデータベースのエントリとキャッシュブロックとの関連付け情報を保持するための構造体であるオブジェクト527を一つ生成する。つまり、一つのオブジェクト527のためのメモリ上の領域を確保する。
According to the flowchart of FIG. 16, the relevance validation processing unit 511 first uses the address value on the memory of the entry as a value unique to the entry of the database to be registered in step S701. A hash function is calculated based on the obtained hash value, and a specific slot to be used is determined (that is, a slot is calculated).
Next, in step S <b> 702, the relevance validation processing unit 511 generates one object 527 that is a structure for retaining the dependency relationship, that is, for retaining the association information between the database entry and the cache block. To do. That is, an area on the memory for one object 527 is secured.

次に、ステップS703において、関連性有効化処理部511は、関連付ける先のキャッシュブロックの世代番号522−1に格納されている世代番号の値を、上で生成したオブジェクト527の世代番号527−1の領域に格納する。これにより、これらオブジェクト527と対応するキャッシュブロックとは、同一の世代番号を保持することになる。
次に、ステップS704において、関連性有効化処理部511は、ステップS702で生成したオブジェクト527を、ステップS701で計算されたスロットに挿入する。つまり、ステップS701で計算されたスロットが指し示す、複数のオブジェクト527からなるリンクリストの先頭又は最後に、ステップS702で生成したオブジェクト527を挿入する。これは、このリンクリスト上のオベジェクト527の次のオブジェクトポインタ527−3を更新することにより行なう。なお、当該スロットが指し示すリンクリストが元々ヌル(オブジェクトが一つもない)であった場合には、ステップS702で生成したオブジェクト527のみからなるリンクリストを当該スロットが指し示すようにすれば良い。そして、関連性有効化処理部は、ステップS702で生成したオブジェクト527のキャッシュブロックポインタ527−2に、該当するキャッシュブロックのアドレスを格納する。
以上の一連の処理により、データベースのエントリと、対応するキャッシュブロックとの関連付けが登録される。
Next, in step S703, the relevancy validation processing unit 511 uses the generation number value stored in the generation number 522-1 of the cache block to be associated as the generation number 527-1 of the object 527 generated above. Store in the area. As a result, these objects 527 and the corresponding cache block hold the same generation number.
Next, in step S704, the relevance validation processing unit 511 inserts the object 527 generated in step S702 into the slot calculated in step S701. That is, the object 527 generated in step S702 is inserted at the beginning or the end of the link list composed of the plurality of objects 527 indicated by the slot calculated in step S701. This is done by updating the object pointer 527-3 next to the object 527 on this link list. If the link list pointed to by the slot is originally null (no object is present), the link list consisting only of the object 527 generated in step S702 may be pointed to by the slot. Then, the relevance validation processing unit stores the address of the corresponding cache block in the cache block pointer 527-2 of the object 527 generated in step S702.
Through the series of processes described above, the association between the database entry and the corresponding cache block is registered.

情報管理装置501は、キャッシュブロックの検証情報522−3や処理情報522−4を生成するために使ったデータベースのエントリ、つまり当該キャッシュブロックを関連付けているエントリが変更されたり削除されたりした場合には、登録されている依存関係(関連付け情報)に基づいて、変更又は削除されたデータベースのエントリに関連する(対応する)キャッシュブロックを無効にする処理を行なう。   The information management apparatus 501 changes the database entry used to generate the cache block verification information 522-3 and the processing information 522-4, that is, when the entry associated with the cache block is changed or deleted. Performs invalidation of the (corresponding) cache block related to the changed or deleted database entry based on the registered dependency (association information).

図17は、上記の、キャッシュブロックを無効にする処理の手順を示すフローチャートである。このフローチャートに沿って説明すると、関連性無効化処理部512(図11)は、ステップS711において、変更(又は削除)されたデータベースのエントリに固有な値(例えば、当該エントリのメモリ上のアドレス値)を基にハッシュ関数による計算を行ない、得られたハッシュ値に基づいてスロットを特定する(つまり、スロットを計算する)。ここで特定されるスロットは、図16のフローチャート(関連性有効化処理)のステップS701で決定されたスロットと同じになるはずである。   FIG. 17 is a flowchart showing a procedure of the above-described processing for invalidating a cache block. Describing along this flowchart, the relevance invalidation processing unit 512 (FIG. 11) determines a value (for example, an address value on the memory of the entry) unique to the changed (or deleted) database entry in step S711. ) Based on the hash function, and a slot is specified based on the obtained hash value (that is, the slot is calculated). The slot specified here should be the same as the slot determined in step S701 in the flowchart (relevance validation processing) in FIG.

次に、関連性無効化処理部512は、ステップS712において、ステップS711で特定されたスロットが指し示すオブジェクト527のリンクリストをたどり、連結されているすべてのオブジェクト527それぞれについて、キャッシュブロックポインタ527−2が指し示すキャッシュブロックを無効にする(つまり、当該キャッシュブロックの有効/無効522−2のフラグを「無効」を表わす値にセットする)。そして、当該キャッシュブロックの世代番号522−1を更新する(例えばインクリメントする)。そして、上記の特定されたスロットが指し示すオブジェクト527のリンクリストに含まれる全てのオブジェクトを回収する。ここで、オブジェクトを回収するとは、つまりそのオブジェクトの領域を解放し、当該特定されたスロットに付随するリンクリストへのポインタの値を「ヌル」にセットすることである。   Next, in step S712, the relevancy invalidation processing unit 512 follows the link list of the object 527 pointed to by the slot specified in step S711, and the cache block pointer 527-2 for each of all the linked objects 527. Is invalidated (that is, the valid / invalid 522-2 flag of the cache block is set to a value representing “invalid”). Then, the generation number 522-1 of the cache block is updated (for example, incremented). Then, all objects included in the link list of the object 527 pointed to by the identified slot are collected. Here, collecting the object means that the area of the object is released and the value of the pointer to the linked list associated with the specified slot is set to “null”.

上記の、関連性無効化処理部512による処理(ステップS711、S712)により、特定のデータベースエントリの変更に対応して、その変更されたエントリに固有の値から計算されたスロットに継っているすべてのオブジェクト527をたどって、対応するキャッシュブロックを無効にすることができた。しかしながら、データベースエントリとキャッシュとは多対多に対応しており、上記処理で無効にしたキャッシュブロックを他のデータベースエントリに対応するオブジェクト527が指したままの状態で残っていることがある。   As a result of the above-described processing by the relevance invalidation processing unit 512 (steps S711 and S712), in response to the change of a specific database entry, it is succeeded by a slot calculated from a value unique to the changed entry. Following all objects 527, the corresponding cache block could be invalidated. However, the database entry and the cache correspond many-to-many, and the cache block invalidated by the above processing may remain in a state where the object 527 corresponding to the other database entry still points.

このような状態が放置されると、回収されないオブジェクト527がメモリの領域を占めることにより、メモリ領域が枯渇してしまうという問題が生じる。また、上記のような状態が放置されると、他のデータベースエントリから、オブジェクト527を経由して、キャッシュブロックの有効/無効522−2の領域や検証情報522−3の領域を参照して初めてそのキャッシュブロックが無効であることがわかるため、ポインタをたどる処理が無駄になるという問題も生じる。   If such a state is left unattended, the object 527 that is not collected occupies the memory area, which causes a problem that the memory area is exhausted. If the above state is left unattended, it is not until the other database entry refers to the cache block valid / invalid 522-2 area or the verification information 522-3 area via the object 527. Since it can be seen that the cache block is invalid, there is a problem that the process of tracing the pointer is wasted.

そこで、情報管理装置501のガーベジ収集処理部513(図11)は、所定のタイミングで(例えば周期的に)、オブジェクトハッシュ526のすべてのブロックを検査することにより、既に無効化されてしまったキャッシュブロックを指しているオブジェクト527(ガーベジ、garbage、ゴミデータ)を回収する処理を行なう。あるオブジェクト527がガーベジであるか否か、つまり既に削除されたキャッシュブロックを指すオブジェクト527であるか否かは、キャッシュブロック内の世代番号522−1とオブジェクト527内の世代番号527−1を比較することにより行なえる。両者の世代番号が異なっていれば、キャッシュブロックは既に無効化されているか、あるいは一旦無効化された後に他のデータのために再度有効化されている状態であるので、そのようなオブジェクト527はガーベジであるとして収集する。両者の世代番号が同じであれば、キャッシュブロックは有効な状態であるので、そのようなオブジェクト527を回収対象とはしない。   Therefore, the garbage collection processing unit 513 (FIG. 11) of the information management apparatus 501 checks the cache of all the objects in the object hash 526 at a predetermined timing (for example, periodically), and has already been invalidated. A process of collecting an object 527 (garbage, garbage, dust data) pointing to a block is performed. Whether or not an object 527 is garbage, that is, whether or not the object 527 indicates a cache block that has already been deleted, is compared with the generation number 522-1 in the cache block and the generation number 527-1 in the object 527. You can do that. If the generation numbers of the two are different, the cache block has already been invalidated or has been invalidated and then revalidated for other data. Collect as being garbage. If the two generation numbers are the same, the cache block is in a valid state, so such an object 527 is not a collection target.

図18は、ガーベジ収集処理部513が、無効となったキャッシュブロックをポイントしているオブジェクト527を回収する処理例を説明するための概略データ構造図である。図示する例では、データベース1(521−1)のエントリ2が変更される。この変更処理に付随して、関連性無効化処理部512(図11)が、エントリ2に固有な情報(当該エントリのメモリ上のアドレス)を基に、ハッシュ関数を用いて、スロットのインデックス値を計算する。そして、このインデックス値が指す場所のスロットを特定する(以上、図17のステップS711)。図示する例では、オブジェクトハッシュ526内のスロット3が特定されたスロットである。そして、関連性無効化処理部512は、スロット3に接続されているオブジェクト527のリストをたどって、オブジェクト(B)を削除(回収)するとともにこれに対応するキャッシュブロック2を無効にし、またオブジェクト(C)を削除(回収)するとともにこれに対応するキャッシュブロック1を無効にする。このとき、無効化されたキャッシュブロック2および1の世代番号は、それぞれ更新(例えば、インクリメント)される(以上、図17のステップS712)。   FIG. 18 is a schematic data structure diagram for explaining a processing example in which the garbage collection processing unit 513 collects an object 527 pointing to an invalid cache block. In the example shown, entry 2 of database 1 (521-1) is changed. Accompanying this change processing, the relevance invalidation processing unit 512 (FIG. 11) uses the hash function to determine the index value of the slot based on the information unique to the entry 2 (address of the entry in memory). Calculate Then, the slot indicated by the index value is specified (step S711 in FIG. 17). In the illustrated example, slot 3 in the object hash 526 is a specified slot. Then, the relevance invalidation processing unit 512 follows the list of the objects 527 connected to the slot 3 to delete (collect) the object (B) and invalidate the corresponding cache block 2. (C) is deleted (collected) and the corresponding cache block 1 is invalidated. At this time, the invalidated generation numbers of the cache blocks 2 and 1 are updated (for example, incremented) (step S712 in FIG. 17).

既に述べているようにデータベースエントリとキャッシュブロックの依存関係(関連付け)は多対多であるため、キャッシュブロック2および1が無効になったときにも、この状態では、キャッシュブロック2を指し示すオブジェクト(A)は回収されないまま残ってしまっている。   As described above, since the dependency (association) between the database entry and the cache block is many-to-many, even when the cache blocks 2 and 1 become invalid, in this state, the object (pointing to the cache block 2 ( A) remains uncollected.

ここで、ガーベジ収集部513は、所定の周期で、オブジェクトハッシュ526に含まれるすべてのスロットから、それらスロットにつながるすべてのオブジェクト527を検査する。その検査の結果、キャッシュブロックの世代番号522−1とオブジェクトの世代番号527−1が一致しないようなオブジェクトをすべて回収する。図示する例では、ガーベジ収集部513がオブジェクト(A)を収集する。なお、オブジェクト(A)が収集される前にはスロット1に付随するポインタにはオブジェクト(A)へのポインタ値が格納されていたが、ガーベジ収集部513は、オブジェクト(A)を収集する際には、スロット1に付随するポインタにオブジェクト(A)の次のオブジェクトへのポインタの値を記録しなおす。
上記のように、世代番号を用いた管理を行なうため、ガーベジ収集部513が走る前にキャッシュブロック1やキャッシュブロック2が再び有効な状態になっていても、正しく、不要なオブジェクトのみを回収することができる。
Here, the garbage collection unit 513 inspects all the objects 527 connected to the slots from all the slots included in the object hash 526 in a predetermined cycle. As a result of the inspection, all objects whose cache block generation number 522-1 and object generation number 527-1 do not match are collected. In the illustrated example, the garbage collection unit 513 collects the object (A). Before the object (A) is collected, the pointer associated with the slot 1 stores the pointer value to the object (A). However, the garbage collection unit 513 collects the object (A). The value of the pointer to the next object of the object (A) is recorded again in the pointer associated with the slot 1.
As described above, since the generation number is used for management, even if the cache block 1 and the cache block 2 are in a valid state again before the garbage collection unit 513 is run, only correct and unnecessary objects are collected. be able to.

なお、ガーベジ収集処理は、例えば、一定周期で実行するなど、適宜所定のタイミングで実行するようにすれば良いが、例えば、空きメモリ容量を監視する監視部を設けて、空きメモリ容量の監視結果に応じて(例えば、空きメモリ容量が所定の閾値を下回った場合などに)ガーベジ収集処理を実行するようにしても良い。また、例えば、監視部がCPU負荷を監視し、CPU負荷の低い時間帯にガーベジ収集処理を実行するようにしても良い。   The garbage collection process may be executed at a predetermined timing as appropriate, for example, at a predetermined cycle. For example, a monitoring unit for monitoring the free memory capacity is provided, and the monitoring result of the free memory capacity is provided. (For example, when the free memory capacity falls below a predetermined threshold), the garbage collection process may be executed. Further, for example, the monitoring unit may monitor the CPU load and execute the garbage collection process in a time zone when the CPU load is low.

また、上では、データベースエントリとキャッシュブロックとの関係が多対多の場合について説明したが、これが、多対1となるようなデータについても、本実施形態を有効に適用することができる。また、上では、データベースの個数がn個の場合について説明したが、nは1以上の整数であれば良い。つまり、データベースの個数が1であっても、本実施形態を有効に適用できる。また、各データベースのエントリ数は任意であり、また各データベースのエントリ数が可変であっても良い。また、キャッシュブロックのエントリ数も任意であり、またこれが可変であっても良い。   In the above, the case where the relationship between the database entry and the cache block is many-to-many has been described. However, the present embodiment can also be effectively applied to data in which this is many-to-one. In the above description, the number of databases is n. However, n may be an integer of 1 or more. That is, even if the number of databases is 1, this embodiment can be applied effectively. The number of entries in each database is arbitrary, and the number of entries in each database may be variable. Also, the number of entries in the cache block is arbitrary, and this may be variable.

なお、上述した実施形態におけるパケット転送装置のパケットの転送処理機能全体あるいはその一部、パケット転送装置のカウンタ情報更新処理機能全体あるいはその一部、およびパケット転送装置のエージング処理機能全体あるいはその一部は、これらの機能実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現しても良い。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。   Note that the entire packet transfer processing function or part of the packet transfer device in the above-described embodiment, the entire counter information update processing function or part of the packet transfer device, and the entire aging processing function or part of the packet transfer device. May be realized by recording a program for realizing these functions on a computer-readable recording medium, reading the program recorded on the recording medium into a computer system, and executing the program. Here, the “computer system” includes an OS and hardware such as peripheral devices.

また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時刻の間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時刻プログラムを保持しているものも含んでも良い。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。   The “computer-readable recording medium” refers to a storage device such as a flexible medium, a magneto-optical disk, a portable medium such as a ROM and a CD-ROM, and a hard disk incorporated in a computer system. Further, the “computer-readable recording medium” dynamically holds a program for a short time, like a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line. It is also possible to include those that hold a program for a certain time, such as a volatile memory inside a computer system serving as a server or client in that case. The program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.

以上、この発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。   The embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to this embodiment, and includes designs and the like that do not depart from the gist of the present invention.

本発明の一実施形態によるパケット転送装置を備えたスイッチの構成を示すブロック図である。It is a block diagram which shows the structure of the switch provided with the packet transfer apparatus by one Embodiment of this invention. 同実施形態によるパケット転送装置の構成を示す機能ブロック図である。It is a functional block diagram which shows the structure of the packet transfer apparatus by the embodiment. 同実施形態によるデータベース参照フォワーディング部の動作を示したブロック図である。It is the block diagram which showed the operation | movement of the database reference forwarding part by the embodiment. 同実施形態によるキャッシュ参照フォワーディング部の動作を示したブロック図である。FIG. 6 is a block diagram showing an operation of a cache reference forwarding unit according to the same embodiment. 同実施形態によるデータベースが記憶する情報と、キャッシュ上のキャッシュブロックが記憶する情報との関連を示したブロック図である。It is the block diagram which showed the relationship between the information which the database by the embodiment memorize | stores, and the information which the cache block on a cache memorize | stores. 同実施形態によるパケット転送装置の動作手順について示したフローチャートである。5 is a flowchart showing an operation procedure of the packet transfer apparatus according to the embodiment. 同実施形態によるパケット転送装置の動作手順について示したフローチャートである。5 is a flowchart showing an operation procedure of the packet transfer apparatus according to the embodiment. 同実施形態によるカウンタの管理手法について示したブロック図である。It is the block diagram shown about the management method of the counter by the same embodiment. 同実施形態によるエージング処理方法について示したブロック図である。It is the block diagram shown about the aging processing method by the embodiment. 本発明の実施形態による情報管理装置のハードウェア構成を示す概略ブロック図である。It is a schematic block diagram which shows the hardware constitutions of the information management apparatus by embodiment of this invention. 同実施形態による情報管理装置の機能構成を示す概略機能ブロック図である。It is a schematic functional block diagram which shows the function structure of the information management apparatus by the embodiment. 同実施形態による情報管理装置が管理するデータ構造の一例を概念的に表わす概略図である。It is the schematic showing notionally an example of the data structure which the information management apparatus by the embodiment manages. 同実施形態による、データベースとキャッシュブロックとの間の関連付けを表わすデータ構造を示した概略図である。It is the schematic which showed the data structure showing the association between a database and a cache block by the embodiment. 同実施形態によるオブジェクト527(関連オブジェクト)の内部データ構造を示す概略図である。It is the schematic which shows the internal data structure of the object 527 (related object) by the embodiment. 同実施形態による、一つのキャッシュブロックの内部データ構造を示す概略図である。It is the schematic which shows the internal data structure of one cache block by the embodiment. 同実施形態による関連性有効化処理部が、データベースのエントリとキャッシュブロックとの間を関連付けて登録する処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process which the association validation process part by the embodiment associates and registers between the entry of a database, and a cache block. 同実施形態による関連性無効化処理部が、キャッシュブロックを無効にする処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process in which the relevance invalidation process part by the same embodiment invalidates a cache block. 同実施形態によるガーベジ収集処理部が不要なオブジェクト(関連オブジェクト)を収集する処理例を説明するための概略データ構造図である。It is a schematic data structure figure for demonstrating the example of a process which the garbage collection process part by the same embodiment collects an unnecessary object (related object).

符号の説明Explanation of symbols

1 : スイッチ装置(パケット転送装置)
2 : 制御カード装置
3 : 入出力ポート
3−1,3−2,3−3 : 入出力ラインカード装置
4−1,4−2,4−3 : フォワーディング処理装置
5−1,5−2,5−3 : パケット処理部
6 : スイッチ部
11 : フィールド抽出部
12 : インデックス計算部(キャッシュブロック特定部)
13 : 検証情報格納部
14 : 検証部
15 : データベース参照フォワーディング部
16 : キャッシュ参照フォワーディング部
17 : フォワーディング部
30−1,30−2,・・・,30−6 : 参照情報
60 : 処理部
200 : キャッシュ部
210−1,210−2,・・・,210−t : キャッシュブロック
521−1,521−2,・・・,521−n : データベース(記憶部)
1: Switch device (packet transfer device)
2: control card device 3: input / output ports 3-1, 3-2, 3-3: input / output line card devices 4-1, 4-2, 4-3: forwarding processing devices 5-1, 5-2 5-3: Packet processing unit 6: Switch unit 11: Field extraction unit 12: Index calculation unit (cache block specifying unit)
13: Verification information storage unit 14: Verification unit 15: Database reference forwarding unit 16: Cache reference forwarding unit 17: Forwarding units 30-1, 30-2,..., 30-6: Reference information 60: Processing unit 200: Cache units 210-1, 210-2, ..., 210-t: Cache blocks 521-1, 521-2, ..., 521-n: Database (storage unit)

Claims (6)

パケットの転送処理に関連する参照情報を記憶する情報エントリを複数個備えた記憶部と、
前記パケットよりパケットのフォワーディングに関連するフィールドを抽出するフィールド抽出部と、
前記フォワーディングに関連するフィールドに対応する前記参照情報をまとめて記憶するキャッシュブロックを複数備えたキャッシュ部と、
前記フィールド抽出部が抽出した前記フォワーディングに関連するフィールドに基づいて前記キャッシュブロックを特定するキャッシュブロック特定部と、
前記キャッシュブロック特定部で特定された前記キャッシュブロックに、前記処理情報が存在するか否か判断する判断部と、
前記判断部で前記処理情報が存在しないと判断された場合、前記フォワーディングに関連するフィールドに基づいて前記参照情報を前記記憶部の前記情報エントリより読み出し、読み出した当該参照情報に基づいて前記パケットの転送処理を行い、当該参照情報を前記処理情報としてまとめて前記キャッシュブロック特定部で特定した前記キャッシュブロックに記憶させ、前記判断部で前記処理情報が存在すると判断された場合、前記キャッシュブロック特定部で特定した前記キャッシュブロックより前記処理情報を読み出し、読み出した当該処理情報に基づいて前記パケットの転送処理を行うフォワーディング部と、
を備えたことを特徴とするパケット転送装置。
A storage unit including a plurality of information entries for storing reference information related to packet transfer processing;
A field extractor for extracting a field related to packet forwarding from the packet;
A cache unit including a plurality of cache blocks that collectively store the reference information corresponding to the fields related to the forwarding;
A cache block identification unit that identifies the cache block based on a field related to the forwarding extracted by the field extraction unit;
A determination unit that determines whether or not the processing information exists in the cache block specified by the cache block specifying unit;
When the determination unit determines that the processing information does not exist, the reference information is read from the information entry of the storage unit based on the field related to the forwarding, and the packet information is read based on the read reference information. Performing the transfer process, storing the reference information as the processing information in the cache block specified by the cache block specifying unit, and when the determining unit determines that the processing information exists, the cache block specifying unit A forwarding unit that reads out the processing information from the cache block identified in step (a) and performs transfer processing of the packet based on the read processing information;
A packet transfer apparatus comprising:
カウンタ情報を更新するカウンタ情報更新部
を備え、
前記情報エントリはさらに第一のカウンタ情報を記憶し、
前記キャッシュブロックはさらに第二のカウンタ情報を記憶し、
前記フォワーディング部はさらに、前記キャッシュ部より前記処理情報を読み出す際に、前記第二のカウンタ情報を更新し、
前記カウンタ更新部は前記第二のカウンタ情報に基づいて前記第一のカウンタ情報を更新し、さらに前記第二のカウンタ情報を更新する
ことを特徴とする請求項1に記載のパケット転送装置。
A counter information update unit for updating the counter information,
The information entry further stores first counter information;
The cache block further stores second counter information;
The forwarding unit further updates the second counter information when reading the processing information from the cache unit,
The packet transfer apparatus according to claim 1, wherein the counter update unit updates the first counter information based on the second counter information, and further updates the second counter information.
エージング情報を更新するエージング情報更新部
を備え、
前記情報エントリはさらに第一のエージング情報を記憶し、
前記キャッシュブロックはさらに第二のエージング情報を記憶し、
前記フォワーディング部はさらに、前記キャッシュブロックより前記処理情報を読み出す際に、前記第二のエージング情報を更新し、
前記エージング情報更新部は前記第二のエージング情報に基づいて前記第一のエージング情報を更新し、さらに前記第二のエージング情報を更新する
ことを特徴とする請求項1または請求項2のいずれか1項に記載のパケット転送装置。
An aging information update unit for updating aging information is provided.
The information entry further stores first aging information;
The cache block further stores second aging information;
The forwarding unit further updates the second aging information when reading the processing information from the cache block,
The aging information update unit updates the first aging information based on the second aging information, and further updates the second aging information. 2. The packet transfer apparatus according to item 1.
パケットの転送処理に関連する参照情報を記憶する情報エントリを複数個備えた記憶部と、
フォワーディングに関連するフィールドに対応する前記参照情報をまとめて記憶するキャッシュブロックを複数備えたキャッシュ部と、
を備えた装置でのパケット転送方法として、
前記パケットよりパケットのフォワーディングに関連するフィールドを抽出するフィールド抽出ステップと、
前記フィールド抽出ステップが抽出した前記フォワーディングに関連するフィールドに基づいて前記キャッシュブロックを特定するキャッシュブロック特定ステップと、
前記キャッシュブロック特定ステップで特定された前記キャッシュブロックに、前記処理情報が存在するか否か判断する判断ステップと、
前記判断ステップで前記処理情報が存在しないと判断された場合、前記フォワーディングに関連するフィールドに基づいて前記参照情報を前記記憶部の前記情報エントリより読み出し、読み出した当該参照情報に基づいて前記パケットの転送処理を行い、当該参照情報を前記処理情報としてまとめて前記キャッシュブロック特定ステップで特定した前記キャッシュブロックに記憶させ、前記判断ステップで前記処理情報が存在すると判断された場合、前記キャッシュブロック特定ステップで特定した前記キャッシュブロックより前記処理情報を読み出し、読み出した当該処理情報に基づいて前記パケットの転送処理を行うフォワーディングステップと、
を備えたことを特徴とするパケット転送方法。
A storage unit including a plurality of information entries for storing reference information related to packet transfer processing;
A cache unit including a plurality of cache blocks that collectively store the reference information corresponding to fields related to forwarding;
As a packet transfer method in a device equipped with
A field extraction step of extracting a field related to packet forwarding from the packet;
A cache block specifying step for specifying the cache block based on the field related to the forwarding extracted by the field extracting step;
A determination step of determining whether or not the processing information exists in the cache block specified in the cache block specifying step;
If it is determined in the determining step that the processing information does not exist, the reference information is read from the information entry of the storage unit based on the field related to the forwarding, and the packet information is read based on the read reference information. Performing the transfer process, storing the reference information as the processing information in the cache block specified in the cache block specifying step, and determining that the processing information exists in the determining step, the cache block specifying step A forwarding step of reading out the processing information from the cache block identified in step, and performing a transfer process of the packet based on the read out processing information;
A packet transfer method comprising:
カウンタ情報を更新するカウンタ情報更新ステップ
を備え、
前記情報エントリはさらに第一のカウンタ情報を記憶し、
前記キャッシュブロックはさらに第二のカウンタ情報を記憶し、
前記フォワーディングステップはさらに、前記キャッシュ部より前記処理情報を読み出す際に、前記第二のカウンタ情報を更新し、
前記カウンタ更新ステップは前記第二のカウンタ情報に基づいて前記第一のカウンタ情報を更新し、さらに前記第二のカウンタ情報を更新する
ことを特徴とする請求項4に記載のパケット転送方法。
A counter information update step for updating the counter information,
The information entry further stores first counter information;
The cache block further stores second counter information;
The forwarding step further updates the second counter information when reading the processing information from the cache unit,
The packet transfer method according to claim 4, wherein the counter updating step updates the first counter information based on the second counter information, and further updates the second counter information.
エージング情報を更新するエージング情報更新ステップ
を備え、
前記情報エントリはさらに第一のエージング情報を記憶し、
前記キャッシュブロックはさらに第二のエージング情報を記憶し、
前記フォワーディングステップはさらに、前記キャッシュブロックより前記処理情報を読み出す際に、前記第二のエージング情報を更新し、
前記エージング情報更新ステップは前記第二のエージング情報に基づいて前記第一のエージング情報を更新し、さらに前記第二のエージング情報を更新する
ことを特徴とする請求項4または請求項5のいずれか1項に記載のパケット転送方法。
An aging information update step for updating aging information is provided.
The information entry further stores first aging information;
The cache block further stores second aging information;
The forwarding step further updates the second aging information when reading the processing information from the cache block,
6. The aging information update step updates the first aging information based on the second aging information, and further updates the second aging information. 2. The packet transfer method according to item 1.
JP2007179419A 2007-07-09 2007-07-09 Packet transfer device and method Pending JP2009017439A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007179419A JP2009017439A (en) 2007-07-09 2007-07-09 Packet transfer device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007179419A JP2009017439A (en) 2007-07-09 2007-07-09 Packet transfer device and method

Publications (1)

Publication Number Publication Date
JP2009017439A true JP2009017439A (en) 2009-01-22

Family

ID=40357732

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007179419A Pending JP2009017439A (en) 2007-07-09 2007-07-09 Packet transfer device and method

Country Status (1)

Country Link
JP (1) JP2009017439A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011077955A (en) * 2009-09-30 2011-04-14 Sii Network Systems Kk Packet transfer device
JP2013526093A (en) * 2010-02-17 2013-06-20 アルカテル−ルーセント Method and system for common group behavior filtering in a communication network environment
JP2013183397A (en) * 2012-03-05 2013-09-12 Kddi Corp Device and method for destination search for flow-by-flow packet transfer
US9832120B2 (en) 2014-01-21 2017-11-28 Fujitsu Limited Packet routing apparatus, interface circuit and packet routing method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011077955A (en) * 2009-09-30 2011-04-14 Sii Network Systems Kk Packet transfer device
JP2013526093A (en) * 2010-02-17 2013-06-20 アルカテル−ルーセント Method and system for common group behavior filtering in a communication network environment
JP2013183397A (en) * 2012-03-05 2013-09-12 Kddi Corp Device and method for destination search for flow-by-flow packet transfer
US9832120B2 (en) 2014-01-21 2017-11-28 Fujitsu Limited Packet routing apparatus, interface circuit and packet routing method

Similar Documents

Publication Publication Date Title
US11811660B2 (en) Flow classification apparatus, methods, and systems
JP3935880B2 (en) Hybrid search memory for network processors and computer systems
US6993031B2 (en) Cache table management device for router and program recording medium thereof
US8898204B1 (en) System and method for controlling updates of a data structure
US9154442B2 (en) Concurrent linked-list traversal for real-time hash processing in multi-core, multi-thread network processors
US7099324B2 (en) System and method for processing packets
US6570877B1 (en) Search engine for forwarding table content addressable memory
US8627448B2 (en) Selective invalidation of packet filtering results
JP2005513895A5 (en)
US8762362B1 (en) System and method for updating a data structure
KR20190111124A (en) KVS Tree
US20070168377A1 (en) Method and apparatus for classifying Internet Protocol data packets
JP2004172917A (en) Packet retrieving device, packet process retrieving method, and program
JP5807676B2 (en) Packet classifier, packet classification method, and packet classification program
CN106407224A (en) Method and device for file compaction in KV (Key-Value)-Store system
CN114844846A (en) Multi-level cache distributed key value storage system based on programmable switch
JP2009017439A (en) Packet transfer device and method
US9152661B1 (en) System and method for searching a data structure
JP5324380B2 (en) Packet transfer device
JP6266445B2 (en) Packet relay apparatus and packet relay method
JP2009017440A (en) Information management device, information management method, packet transfer device, packet transfer method, and computer program
CN113810298A (en) OpenFlow virtual flow table elastic acceleration searching method supporting network flow jitter
CN113177069A (en) Cache and query system and query method
JP7396469B2 (en) Traffic monitoring devices, methods and programs
JP2023139733A (en) Switch device and method of controlling switch device

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20091105

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20091113

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20091118