JP5611171B2 - Packet processing method and packet processing apparatus - Google Patents

Packet processing method and packet processing apparatus Download PDF

Info

Publication number
JP5611171B2
JP5611171B2 JP2011240829A JP2011240829A JP5611171B2 JP 5611171 B2 JP5611171 B2 JP 5611171B2 JP 2011240829 A JP2011240829 A JP 2011240829A JP 2011240829 A JP2011240829 A JP 2011240829A JP 5611171 B2 JP5611171 B2 JP 5611171B2
Authority
JP
Japan
Prior art keywords
flow
packet
queue
processing
packets
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2011240829A
Other languages
Japanese (ja)
Other versions
JP2013098815A (en
Inventor
孝紀 柳沼
孝紀 柳沼
平尾 努
努 平尾
野末 大樹
大樹 野末
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2011240829A priority Critical patent/JP5611171B2/en
Publication of JP2013098815A publication Critical patent/JP2013098815A/en
Application granted granted Critical
Publication of JP5611171B2 publication Critical patent/JP5611171B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、パケット処理装置におけるパケット処理方法に係り、特に、低トラフィックのフローに対するパケット破棄を減らしつつ、ネットワークの輻輳回避を行う技術に関する。   The present invention relates to a packet processing method in a packet processing apparatus, and more particularly to a technique for avoiding network congestion while reducing packet discard for low traffic flows.

近年、インターネットを用いた通信サービスの高度化とユーザの増加に伴い、ネットワークトラフィック量が増加し続けている。そのため、トラフィックが集中する箇所では輻輳が発生する可能性が高まり、エンドユーザに多大な影響を及ぼすことが懸念される。このような問題を解決するために、通信装置の多くはパケット処理性能の向上対策や輻輳制御機能を実装する等の対策を施している。   In recent years, with the advancement of communication services using the Internet and the increase in users, the amount of network traffic continues to increase. For this reason, there is a concern that congestion is likely to occur at a location where traffic is concentrated, and the end user is greatly affected. In order to solve such a problem, many communication devices take measures such as measures for improving packet processing performance and implementing a congestion control function.

前者の例として、特許文献1には、複数のハードウェアでパケット処理を並列化する方式が開示されている。この方式では、パケット振分け部がすべてのパケットを一旦受信し、受信したパケットを複数のパケット処理部に振り分けることでパケット処理を並列化する。   As an example of the former, Patent Document 1 discloses a method of parallelizing packet processing with a plurality of hardware. In this method, the packet distribution unit receives all packets once, and distributes the received packets to a plurality of packet processing units to parallelize packet processing.

後者の例としては、パケット破棄による輻輳制御方式があり、中でも最も簡易的なものはTail Drop方式である。このTail Drop方式では、受信したパケットを到着順にキューに蓄積し、このキューが満杯になっているときに到着して溢れたパケットをすべて破棄するものである。しかし、この方式ではパケット破棄が連続的に行われることが多いため、パケットの再送が頻発してパケット間の衝突が起こったときに、ネットワークのスループットが低下するという問題がある。   As an example of the latter, there is a congestion control method by packet discard, and the simplest one is the tail drop method. In this tail drop method, received packets are accumulated in a queue in the order of arrival, and all packets that arrive and overflow when this queue is full are discarded. However, in this method, since packet discarding is often performed continuously, there is a problem in that network throughput decreases when packet retransmission occurs frequently and collisions occur between packets.

このTail Drop方式におけるパケットの連続的な破棄を緩和するものとして、非特許文献1には、アクティブキュー管理方式が提案されている。その代表的な方式であるRED(Random Early Detection)アルゴリズムにおいては、キュー溢れによる連続的なパケット破棄を抑止するために、キューに格納されているパケット数が所定の閾値を超えると、パケットを統計的(確率的)に破棄することで、キューが溢れないようにする。これにより、Tail Drop方式よりも高いスループットを得ることができる。   Non-Patent Document 1 proposes an active queue management method as a means of reducing continuous discard of packets in the tail drop method. In the RED (Random Early Detection) algorithm, which is a typical method, when the number of packets stored in the queue exceeds a predetermined threshold, the packet is statistically analyzed in order to suppress continuous packet discard due to queue overflow. By discarding the target (probabilistically), the queue is prevented from overflowing. Thereby, a higher throughput than the tail drop method can be obtained.

特開2010−161546号公報JP 2010-161546 A

IETF RFC2309: Recommendations on Queue Management and Congestion Avoidance in the Internet, April 1998.IETF RFC2309: Recommendations on Queue Management and Congestion Avoidance in the Internet, April 1998.

前記のようなパケット処理の並列化とREDアルゴリズムとを組み合わせて、パケット振分け部が各パケット処理部の処理待ちキューにパケットを振り分けるときにREDアルゴリズムを適用することにより、パケット処理性能の向上を図りつつパケットの連続的な破棄に伴うスループットの低下を防ぐことが可能である。   By combining the parallelization of packet processing and the RED algorithm as described above, the packet distribution unit applies the RED algorithm when distributing packets to the processing queue of each packet processing unit, thereby improving packet processing performance. However, it is possible to prevent a decrease in throughput due to continuous discarding of packets.

しかし、一つのパケット処理部には複数のフローが割り当てられるのが一般的である。そのため、帯域使用率の高いフローと帯域使用率の低いフローとが同じパケット処理部に割り当てられた場合、REDアルゴリズムによるキュー管理のみでは、帯域使用率の低いフローのパケットであっても同じ確率で破棄されることになる。つまり、自身のフローの帯域使用率が低いのにも関わらず、帯域使用率の高いフローの影響によってパケット破棄が発生してしまうという問題がある。これは、ベストエフォート型ネットワークサービスにとって好ましくない。   However, a plurality of flows are generally assigned to one packet processing unit. Therefore, if a flow with a high bandwidth usage rate and a flow with a low bandwidth usage rate are assigned to the same packet processing unit, even with a queue management based on the RED algorithm, even a packet with a low bandwidth usage rate has the same probability. It will be destroyed. That is, there is a problem that packet discarding occurs due to the influence of a flow with a high bandwidth usage rate even though the bandwidth usage rate of its own flow is low. This is undesirable for best effort network services.

本発明は、前記のような問題に鑑みてなされたものであり、パケット処理の並列化によるパケット処理性能の向上を図りつつ、帯域使用率の低いフローにおけるパケット破棄を減らすことが可能なパケット処理方法及びパケット処理装置を提供することを目的とする。   The present invention has been made in view of the above problems, and packet processing capable of reducing packet discard in a flow with a low bandwidth utilization rate while improving packet processing performance by parallelizing packet processing. It is an object to provide a method and a packet processing apparatus.

前記の目的を達成するために、本発明は、それぞれが処理待ちキューを有する複数のパケット処理部と、外部から受信したパケットをキューイングする受信キューと、この受信キューから取り出した受信パケットをいずれかの前記処理待ちキューに振り分けるパケット振分け部と、各処理待ちキューの状態を表すキュー管理情報、及び、各パケットが属するフローの振り分け先と処理待ちのパケット数とを含むフロー管理情報を保持する情報保持部とを備えるパケット処理装置において、前記パケット振分け部は、前記受信パケットのヘッダ情報から当該パケットが含まれるフローを特定して、前記フロー管理情報を参照して同じフローに属するすべてのパケット群を同じ処理待ちキューに振り分け、前記キュー管理情報を参照することにより、振り分け先の前記処理待ちキューにキューイングされているパケットの数が所定の閾値を超えていると判定した場合は、さらに、前記フロー管理情報を参照することにより、当該処理待ちキューに含まれる当該振り分け対象パケットと同じフローに属するパケットの数であるフロー別パケット数が所定のフロー閾値以上であるか否かを判定し、前記フロー別パケット数が前記フロー閾値以上である場合に、当該振り分け対象パケットを所定のアルゴリズムによって確率的に破棄する一方、前記処理待ちキューに割り当てられているフロー数が前記所定のアルゴリズムを適用するための所定の最小フロー数に満たないものと判定した場合に、前記所定のアルゴリズムを適用しないものとした。 In order to achieve the above object, the present invention includes a plurality of packet processing units each having a processing queue, a reception queue for queuing packets received from the outside, and a reception packet taken out from the reception queue. A packet distribution unit that distributes to the processing queue, queue management information that indicates the status of each processing queue, and flow management information that includes a distribution destination of the flow to which each packet belongs and the number of packets waiting to be processed In the packet processing device including the information holding unit, the packet distribution unit specifies all the packets belonging to the same flow by specifying the flow including the packet from the header information of the received packet and referring to the flow management information By allocating the group to the same processing queue and referring to the queue management information If it is determined that the number of packets queued in the processing queue that is the distribution destination exceeds a predetermined threshold, the packet is included in the processing queue by referring to the flow management information. It is determined whether or not the number of packets by flow, which is the number of packets belonging to the same flow as the distribution target packet, is equal to or greater than a predetermined flow threshold, and when the number of packets by flow is equal to or greater than the flow threshold, the distribution When it is determined that the number of flows assigned to the processing queue is less than a predetermined minimum number of flows for applying the predetermined algorithm, while the target packet is stochastically discarded by a predetermined algorithm, The predetermined algorithm is not applied .

本発明によれば、パケット処理の並列化によるパケット処理性能の向上を図りつつ、帯域使用率の低いフローにおけるパケット破棄を減らすことが可能なパケット処理方法及びパケット処理装置を提供することができる。   According to the present invention, it is possible to provide a packet processing method and a packet processing apparatus capable of reducing packet discard in a flow with a low bandwidth usage rate while improving packet processing performance by parallelizing packet processing.

パケット処理装置の機能構成例を示す図ある。It is a figure which shows the function structural example of a packet processing apparatus. パケット処理装置のハードウェア構成例を示す図である。It is a figure which shows the hardware structural example of a packet processing apparatus. キュー管理テーブルの構成及びデータ例である。It is a structure and data example of a queue management table. フロー管理テーブルの構成及びデータ例である。It is a structure and data example of a flow management table. 統計情報テーブルの構成及びデータ例である。It is a structure and data example of a statistical information table. パケット振分け部の動作例を示すフローチャートである。It is a flowchart which shows the operation example of a packet distribution part. パケット振分け部におけるパケット振分け及び破棄処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the packet distribution and the discard process in a packet distribution part. パケット処理部の動作例を示すフローチャートである。It is a flowchart which shows the operation example of a packet process part. パケット振分け部におけるフロー閾値初期化処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the flow threshold value initialization process in a packet distribution part. コンフィグファイルにおけるシステムパラメータの記述例である。It is a description example of a system parameter in a configuration file.

以下、本発明を実施するための形態を適宜図面を参照しながら説明するが、本発明の実施態様はこれに限定されるものではなく、本発明の趣旨を逸脱しない範囲内において各種変形が可能である。   DESCRIPTION OF EMBODIMENTS Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings as appropriate. However, embodiments of the present invention are not limited thereto, and various modifications can be made without departing from the spirit of the present invention. It is.

図1は、本発明の実施形態に係るパケット処理装置の機能構成例を示す図である。図1に示すように、パケット処理装置100は、受信キュー101と、パケット振分け部102と、複数の処理待ちキュー103と、複数のパケット処理部104と、送信キュー105と、情報保持部106とを備えて構成されている。また、情報保持部106は、キュー管理テーブル300、フロー管理テーブル400、及び統計情報テーブル500を備え、さらに、装置の動作に必要な各種システムパラメータなどを記憶する。   FIG. 1 is a diagram illustrating a functional configuration example of a packet processing device according to an embodiment of the present invention. As shown in FIG. 1, the packet processing apparatus 100 includes a reception queue 101, a packet distribution unit 102, a plurality of processing queues 103, a plurality of packet processing units 104, a transmission queue 105, and an information holding unit 106. It is configured with. The information holding unit 106 includes a queue management table 300, a flow management table 400, and a statistical information table 500, and further stores various system parameters necessary for the operation of the apparatus.

パケット処理装置100が中継すべきパケットを受信すると、当該受信パケットは受信キュー101に一時保存される。パケット振分け部102は、受信キュー101に一時保存されている受信パケットを1つずつ取り出して、複数のパケット処理部104のなかのいずれか1つに当該パケットを振り分ける。より詳しくは、パケット振分け部102は、受信パケットのヘッダ情報から当該パケットのフロー種別及びフローIDを抽出し、キュー管理テーブル300を参照して振分け先の処理待ちキュー103(及び対応するパケット処理部104)を特定したのち、特定した処理待ちキュー103に当該パケットをキューイングする。このとき、キュー管理テーブル300において、抽出したフローIDに対してすでに特定の処理待ちキュー103(及びパケット処理部104)が割り当てられていれば、当該割り当て済みの処理待ちキュー103に当該パケットを振り分け、まだ処理待ちキュー103(及びパケット処理部104)が割り当てられていなければ、新たにいずれか1つを割り当てる。割り当ての方法は特に限定されないが、例えば、その時点で最も負荷が小さいパケット処理部104(及び対応する処理待ちキュー103)を割り当てるものとしてもよいし、その時点で最もキューイングされているパケット数が少ない処理待ちキュー103(及びパケット処理部104)を割り当てるものとしてもよい。   When the packet processing apparatus 100 receives a packet to be relayed, the received packet is temporarily stored in the reception queue 101. The packet distribution unit 102 takes out received packets temporarily stored in the reception queue 101 one by one, and distributes the packets to any one of the plurality of packet processing units 104. More specifically, the packet distribution unit 102 extracts the flow type and flow ID of the packet from the header information of the received packet, refers to the queue management table 300, and distributes the processing waiting queue 103 (and corresponding packet processing unit). 104), the packet is queued in the specified processing queue 103. At this time, if a specific processing queue 103 (and packet processing unit 104) has already been assigned to the extracted flow ID in the queue management table 300, the packet is distributed to the assigned processing queue 103. If the processing queue 103 (and the packet processing unit 104) has not been allocated yet, any one is newly allocated. The allocation method is not particularly limited, and for example, the packet processing unit 104 (and the corresponding processing queue 103) having the smallest load at that time may be allocated, or the number of packets queued most at that time. It is also possible to allocate the processing waiting queue 103 (and the packet processing unit 104) with a small number of queues.

各パケット処理部104は、自身に対応する処理待ちキュー103からパケットを1つずつ取り出して、ルーティング処理やプロトコル処理など当該パケット処理装置100に要求されるパケット処理を行ったのち、処理済みのパケットである送信パケットを送信キュー105にキューイングする。送信キュー105にキューイングされた各送信パケットは、不図示のパケット送信部によって所定の送信先に順次送信される。   Each packet processing unit 104 extracts packets one by one from the processing queue 103 corresponding to itself, performs packet processing required for the packet processing device 100 such as routing processing and protocol processing, and then processes the processed packets. Is queued in the transmission queue 105. Each transmission packet queued in the transmission queue 105 is sequentially transmitted to a predetermined transmission destination by a packet transmission unit (not shown).

続いて、図2を参照して、パケット処理装置のハードウェア構成を説明する。図2は、パケット処理装置のハードウェア構成例を示す図である。図2に示すように、パケット処理装置100は、バス200で相互接続されたマルチコアCPU(Central Processing Unit)201と、入力IF(Interface)202と、出力IF203と、メモリ204とを備えて構成されている。さらに、マルチコアCPUのなかのコア#0(符号205)は、パケット振分け部として動作し、コア#1からコア#N(符号206)は、それぞれパケット処理部として動作する。ここでは、図1に示したパケット振分け部102及びパケット処理部104は、各コアが所定のプログラムを実行することで具現化されるものとするが、それぞれの処理部をハードウェアで実現するものとしてもよい。   Next, the hardware configuration of the packet processing device will be described with reference to FIG. FIG. 2 is a diagram illustrating a hardware configuration example of the packet processing device. As shown in FIG. 2, the packet processing apparatus 100 includes a multi-core CPU (Central Processing Unit) 201, an input IF (Interface) 202, an output IF 203, and a memory 204 that are interconnected by a bus 200. ing. Furthermore, core # 0 (symbol 205) in the multi-core CPU operates as a packet distribution unit, and cores # 1 to #N (symbol 206) each operate as a packet processing unit. Here, although the packet distribution unit 102 and the packet processing unit 104 shown in FIG. 1 are implemented by each core executing a predetermined program, each processing unit is realized by hardware. It is good.

入力IF202は、不図示の通信回線を介して外部から受信した信号を、装置内部で扱うデータ形式に変換し、受信パケットとして受信キュー101(図1参照)にキューイングする。出力IF203は、送信キュー105(図1参照)から送信パケットを取り出し、外部が扱う信号形式に変換して不図示の通信回線を介して送信する。また、RAM(Random Access Memory)などによって構成されるメモリ204には、受信キュー101と、複数の処理待ちキュー103と、送信キュー105と、情報保持部106との各領域が、それぞれ割り当てられる。   The input IF 202 converts a signal received from the outside via a communication line (not shown) into a data format handled inside the apparatus, and queues it as a received packet in the reception queue 101 (see FIG. 1). The output IF 203 takes out a transmission packet from the transmission queue 105 (see FIG. 1), converts it into a signal format handled by the outside, and transmits it via a communication line (not shown). In addition, areas such as a reception queue 101, a plurality of processing queues 103, a transmission queue 105, and an information holding unit 106 are allocated to a memory 204 configured by a RAM (Random Access Memory) or the like.

図3は、キュー管理テーブルの構成及びデータ例である。図3に示すように、キュー管理テーブル300には、コア番号301、フロー種別302、DROP閾値303、RED閾値304、初期フロー閾値305、RED適用フロー数306、処理待ちパケット数307、フロー数308、及びフローリスト309を属性としてもつレコードが、パケット処理部104として機能するコア206(コア#1〜N)の数だけ登録される。   FIG. 3 shows a configuration and data example of the queue management table. As shown in FIG. 3, the queue management table 300 includes a core number 301, a flow type 302, a DROP threshold 303, a RED threshold 304, an initial flow threshold 305, a RED application flow number 306, a processing waiting packet number 307, and a flow number 308. , And records having the flow list 309 as attributes are registered by the number of cores 206 (cores # 1 to N) that function as the packet processing unit 104.

コア番号301は、当該レコードに対応付けられているコア206及び対応するパケット処理部104の識別番号である。フロー種別302は、当該コア206に割り当てられるフローの種別を表すものであり、例えば、送信元のIP(Internet Protocol)アドレス毎にフローを区別する「送信元IP」、宛先ポート毎にフローを区別する「宛先ポート」、宛先のIPアドレス毎にフローを区別する「宛先IP」などの値が設定される。   The core number 301 is an identification number of the core 206 associated with the record and the corresponding packet processing unit 104. The flow type 302 represents the type of flow assigned to the core 206. For example, the “source IP” that distinguishes the flow for each IP (Internet Protocol) address of the source, and the flow for each destination port. A value such as “destination port” to be performed and “destination IP” for distinguishing the flow for each IP address of the destination is set.

DROP閾値303は、Tail Drop方式を適用してそれぞれの処理待ちキュー103から溢れたパケットを破棄するか否かを判定するための基準となるパケット数であり、それぞれの処理待ちキュー103にキューイング可能な最大パケット数に相当する。RED閾値304は、それぞれの処理待ちキュー103に対してREDアルゴリズムを適用するか否かを判定するための基準となるパケット数である。初期フロー閾値305は、図4の説明にて後記するフロー閾値404の初期値である。RED適用フロー数306は、当該コア206に割り当てられているフローの数が少ないときにはREDアルゴリズムを適用しないようにするための基準となるフローの数である。   The DROP threshold 303 is the number of packets serving as a reference for determining whether to discard packets overflowing from each processing queue 103 by applying the tail drop method, and is queued in each processing queue 103. Corresponds to the maximum number of packets possible. The RED threshold 304 is the number of packets serving as a reference for determining whether or not to apply the RED algorithm to each processing queue 103. The initial flow threshold 305 is an initial value of the flow threshold 404 described later in the description of FIG. The number of RED application flows 306 is the number of flows serving as a reference for preventing the RED algorithm from being applied when the number of flows assigned to the core 206 is small.

処理待ちパケット数307は、当該パケット処理部104に対応する処理待ちキュー103にキューイングされているパケットの数であり、この値がRED閾値304よりも大きくDROP閾値よりも小さいときに、REDアルゴリズムの適用可否の判定が行われる。フロー数308は、当該パケット処理部104に割り当てられているフローの数であり、この値がRED適用フロー数306よりも大きくなければREDアルゴリズムは適用されない。フローリスト309は、当該パケット処理部104に割り当てられているすべてのフローのフロー番号のリストであり、例えば図3の1行目のレコードは、コア#1に対応するパケット処理部104に、フロー番号#1,#9,#26,#38,#46の5つのフローが割り当てられている状態を示している。これらのフローリスト309は、新たなフローの発生やフローの消滅に伴って動的にデータが更新される。   The processing waiting packet number 307 is the number of packets queued in the processing waiting queue 103 corresponding to the packet processing unit 104. When this value is larger than the RED threshold 304 and smaller than the DROP threshold, the RED algorithm The applicability determination is performed. The flow number 308 is the number of flows assigned to the packet processing unit 104. If this value is not larger than the RED application flow number 306, the RED algorithm is not applied. The flow list 309 is a list of the flow numbers of all flows assigned to the packet processing unit 104. For example, the record in the first row in FIG. 3 is sent to the packet processing unit 104 corresponding to the core # 1. A state is shown in which five flows of numbers # 1, # 9, # 26, # 38, and # 46 are assigned. In these flow lists 309, data is dynamically updated as new flows are generated or flows disappear.

図4は、フロー管理テーブルの構成及びデータ例である。図4に示すように、フロー管理テーブル400には、フロー番号401、コア番号402、パケット数403、フロー閾値404、及び閾値初期化カウンタ405を属性としてもつレコードが、パケット処理部104に割り当てられているフローの数だけ登録される。   FIG. 4 shows a configuration and data example of the flow management table. As shown in FIG. 4, in the flow management table 400, a record having a flow number 401, a core number 402, the number of packets 403, a flow threshold 404, and a threshold initialization counter 405 as attributes is assigned to the packet processing unit 104. The number of registered flows is registered.

フロー番号401は、当該レコードに対応付けられているフローに対して付与されるユニークな識別番号である。各受信パケットが属するフローのフロー番号は、当該パケットのヘッダ情報を解析することにより一意に特定される。コア番号402は、当該フローが割り当てられたパケット処理部104に該当するコア206の識別番号である。パケット数403は、当該コア206に対応する処理待ちキュー103にキューイングされているパケットのうち当該フローに属するパケットの数である。フロー閾値404は、当該フローに対してREDアルゴリズムを適用するか否かを判定するための基準となるパケット数であり、当該フローのパケット数403の値がこのフロー閾値を超えている場合に、当該フローに対してREDアルゴリズムが適用されることになる。後記にて説明するように、フロー閾値404の値は、当該フローに対してREDアルゴリズムが適用される度に減少していく。閾値初期化カウンタ405は、減少したフロー閾値404の値を所定の初期フロー閾値305(図3)に戻すために用いるカウンタである。   The flow number 401 is a unique identification number assigned to the flow associated with the record. The flow number of the flow to which each received packet belongs is uniquely specified by analyzing the header information of the packet. The core number 402 is an identification number of the core 206 corresponding to the packet processing unit 104 to which the flow is assigned. The packet number 403 is the number of packets belonging to the flow among the packets queued in the processing queue 103 corresponding to the core 206. The flow threshold value 404 is the number of packets serving as a reference for determining whether or not to apply the RED algorithm to the flow. When the value of the packet number 403 of the flow exceeds the flow threshold value, The RED algorithm is applied to the flow. As will be described later, the value of the flow threshold 404 decreases each time the RED algorithm is applied to the flow. The threshold initialization counter 405 is a counter used for returning the decreased value of the flow threshold 404 to the predetermined initial flow threshold 305 (FIG. 3).

なお、図4に示したデータ例は、フロー番号#1,#9,#46のフローが、フロー閾値404の初期値(=初期フロー閾値305)が「100」であるコア#1に割り当てられており、フロー#9のフローに対してREDアルゴリズムが適用されたことで該当するフロー閾値404が「95」にまで減少した状態を表している。フロー閾値404の減少の単位は、システムパラメータとして設定可能であり、この値を0とすれば、フロー閾値404を減少させないようにすることも可能である。   In the data example shown in FIG. 4, the flows with flow numbers # 1, # 9, and # 46 are assigned to the core # 1 whose initial value of the flow threshold 404 (= initial flow threshold 305) is “100”. The flow threshold value 404 is reduced to “95” by applying the RED algorithm to the flow of the flow # 9. The unit of decrease of the flow threshold value 404 can be set as a system parameter. If this value is set to 0, the flow threshold value 404 can be prevented from being decreased.

図5は、統計情報テーブルの構成及びデータ例である。図5に示すように、統計情報テーブル500には、コア番号501、総受信パケット数502、総送信パケット数503、総破棄パケット数504、前回総受信パケット数505、及び前回受信パケット数506を属性としてもつレコードが、パケット処理部104として機能するコア206(コア#1〜N)の数だけ登録される。   FIG. 5 shows a configuration and data example of the statistical information table. As shown in FIG. 5, the statistical information table 500 includes a core number 501, a total received packet number 502, a total transmitted packet number 503, a total discarded packet number 504, a previous total received packet number 505, and a previous received packet number 506. Records as attributes are registered by the number of cores 206 (cores # 1 to N) that function as the packet processing unit 104.

コア番号501は、当該レコードに対応付けられているコア206及び対応するパケット処理部104の識別番号である。総受信パケット数502は、統計情報の収集を開始してから当該コア206(パケット処理部104)が受信した(当該コアに振り分けられた)パケットの総数であり、総送信パケット数503は、当該コア206(パケット処理部104)が送信した(送信キュー105にキューイングした)パケットの総数である。総破棄パケット数504は、当該コア206(パケット処理部104)に振り分けられたパケットのうち破棄されたパケットの総数であり、総受信パケット数502から総送信パケット数503と処理待ちパケット数307(図3)との和を引いた値に等しい。   The core number 501 is an identification number of the core 206 associated with the record and the corresponding packet processing unit 104. The total number of received packets 502 is the total number of packets received (distributed to the core) by the core 206 (packet processing unit 104) since the start of collection of statistical information, and the total number of transmitted packets 503 is This is the total number of packets transmitted (queued in the transmission queue 105) by the core 206 (packet processing unit 104). The total number of discarded packets 504 is the total number of packets discarded among the packets distributed to the core 206 (packet processing unit 104). From the total number of received packets 502 to the total number of transmitted packets 503 and the number of waiting packets 307 ( It is equal to the value obtained by subtracting the sum of FIG.

前回総受信パケット数505は、所定の単位時間(例えば5秒)毎にその時点における総受信パケット数502の値を記憶したものであり、単位時間毎に値が上書きされて更新される。つまり、前回総受信パケット数505は、前回の上書き更新時における総受信パケット数502の値を示している。前回受信パケット数506は、前回総受信パケット数505の前々回の上書き更新時から前回の上書き更新時までの単位時間に受信したパケットの数を記憶したものである。   The previous total received packet count 505 stores the value of the total received packet count 502 at that time every predetermined unit time (for example, 5 seconds), and is updated by overwriting the value every unit time. That is, the previous total received packet number 505 indicates the value of the total received packet number 502 at the time of the previous overwrite update. The previous received packet count 506 stores the number of packets received in unit time from the previous overwrite update of the previous total received packet count 505 to the previous overwrite update.

例えば、図5に例示した状態にて今回の上書き更新が行われるときには、コア番号が1である1行目のレコードについては、総受信パケット数502の値である「1340」が前回総受信パケット数505に上書きされて記憶され、前回受信パケット数506には、総受信パケット数502の値「1340」から前回総受信パケット数505の値「1220」を引いた値である「120」が上書きされて記憶される。   For example, when the current overwrite update is performed in the state illustrated in FIG. 5, “1340” that is the value of the total number of received packets 502 for the record in the first row with the core number 1 is the previous total received packet. The previous received packet number 506 is overwritten with “120”, which is a value obtained by subtracting the value “1220” of the previous total received packet number 505 from the value “1340” of the total received packet number 502. And memorized.

この統計情報テーブル500を参照することによって、パケット処理部104として機能する各コア206におけるパケット破棄率や受信パケット数の増減を把握し、パケット処理装置100の動作を規定する各種システムパラメータを自動または手動で適宜調整することが可能となる。   By referring to this statistical information table 500, it is possible to grasp the packet discard rate and increase / decrease in the number of received packets in each core 206 functioning as the packet processing unit 104, and automatically or It becomes possible to adjust manually manually.

続いて、図6及び図7を参照して、パケット振分け部の動作を説明する。図6は、パケット振分け部の動作例を示すフローチャートであり、図7は、パケット振分け部におけるパケット振分け及び破棄処理の詳細を示すフローチャートである。   Next, the operation of the packet distribution unit will be described with reference to FIGS. FIG. 6 is a flowchart illustrating an operation example of the packet distribution unit, and FIG. 7 is a flowchart illustrating details of packet distribution and discard processing in the packet distribution unit.

図6に示すように、パケット振分け部102の振分け処理部は、まず、入力IF202が受信して受信キュー101にキューイングした受信パケットを、受信キュー101から1つ取り出す(ステップ601)。このとき、パケットに優先度が付されていれば、最も優先度の高いパケット群のなかから優先して受信パケットを取り出すようにしてもよい。次に、振分け処理部は、受信パケットのヘッダ情報を解析することによって当該パケットのフロー種別とフローの識別情報であるフロー番号とを特定し(ステップ602)、当該フロー番号がフロー管理テーブル400に登録されてパケット処理部104が割当て済みであるか否かを判定する(ステップ603)。   As shown in FIG. 6, the distribution processing unit of the packet distribution unit 102 first takes out one received packet received by the input IF 202 and queued in the reception queue 101 from the reception queue 101 (step 601). At this time, if priority is given to the packet, the received packet may be extracted with priority from the packet group having the highest priority. Next, the distribution processing unit identifies the flow type of the packet and the flow number as the flow identification information by analyzing the header information of the received packet (step 602), and the flow number is stored in the flow management table 400. It is determined whether the packet processing unit 104 has been registered and has been assigned (step 603).

パケット処理部104が割当て済みである場合には(ステップ603で「Yes」)、ステップ606に処理を進めて割当て済みのパケット処理部104へのパケット振分け処理を行い、パケット処理部104が割り当てられていない新たなフローである場合には(ステップ603で「No」)、ステップ604に処理を進める。   If the packet processing unit 104 has been allocated (“Yes” in step 603), the process proceeds to step 606 to perform packet distribution processing to the allocated packet processing unit 104, and the packet processing unit 104 is allocated. If the flow is not a new flow (“No” in step 603), the process proceeds to step 604.

ステップ604では、振分け処理部は、キュー管理テーブル300を参照することにより、特定したフロー種別に適合するパケット処理部104を1つ選択し、当該パケット処理部104に対して当該フローを割り当てる(ステップ605)。具体的には、フロー管理テーブル400に当該フローのフロー番号を有する新たなレコードを生成して追加登録するとともに、キュー管理テーブル300の当該パケット処理部104に該当するレコードのフロー数308に1を加算し、フローリスト309に当該フロー番号を追加登録する。適合するパケット処理部104が複数存在するときには、例えば、処理待ちパケット数307が最小のパケット処理部104を選択するようにしてもよいし、フロー数308が最小のパケット処理部104を選択するようにしてもよい。そののち、ステップ606に処理を進めて新規に割り当てたパケット処理部104へのパケット振分け処理を行う。   In step 604, the distribution processing unit selects one packet processing unit 104 that matches the identified flow type by referring to the queue management table 300, and allocates the flow to the packet processing unit 104 (step 604). 605). Specifically, a new record having the flow number of the flow is generated and additionally registered in the flow management table 400, and 1 is set to the flow number 308 of the record corresponding to the packet processing unit 104 of the queue management table 300. In addition, the flow number is additionally registered in the flow list 309. When there are a plurality of matching packet processing units 104, for example, the packet processing unit 104 with the smallest number of waiting packets 307 may be selected, or the packet processing unit 104 with the smallest number of flows 308 may be selected. It may be. After that, the process proceeds to step 606 to perform packet distribution processing to the newly assigned packet processing unit 104.

図7に示すように、パケット振分け及び破棄処理においては、パケット振分け部102の破棄処理部は、まず、振分け先のパケット処理部104に対応するキュー管理情報及び当該パケットが属するフローのフロー管理情報を取得する(ステップ701)。具体的には、キュー管理テーブル300から当該パケット処理部104に該当するコア番号を有するレコードを読み出し、フロー管理テーブル400から当該パケットに該当するフロー番号を有するレコードを読み出す。次に、破棄処理部は、受信パケット数の加算を行う(ステップ702)。具体的には、統計情報テーブル500において、当該パケット処理部104に該当するコア番号を有するレコードの総受信パケット数502の値に1を加算する。   As shown in FIG. 7, in packet distribution and discard processing, the discard processing unit of the packet distribution unit 102 firstly queue management information corresponding to the packet processing unit 104 of the distribution destination and flow management information of the flow to which the packet belongs. Is acquired (step 701). Specifically, a record having a core number corresponding to the packet processing unit 104 is read from the queue management table 300, and a record having a flow number corresponding to the packet is read from the flow management table 400. Next, the discard processing unit adds the number of received packets (step 702). Specifically, in the statistical information table 500, 1 is added to the value of the total number of received packets 502 of the record having the core number corresponding to the packet processing unit 104.

次に、破棄処理部は、キュー管理テーブル300から読み出したレコードを参照することにより、振分け対象のパケットを当該処理待ちキュー103にキューイングすると処理待ちパケット数(処理待ちパケット数307に1を加算した値)がDROP閾値303を超えるか否かを判定する(ステップ703)。   Next, the discard processing unit refers to the record read from the queue management table 300 to queue the distribution target packet in the processing queue 103, and adds 1 to the processing waiting packet count (processing waiting packet count 307). Whether or not the value exceeds the DROP threshold value 303 (step 703).

処理待ちパケット数>DROP閾値 となる場合(ステップ703で「Yes」)、ステップ714に処理を進め、フロー管理テーブル400から読み出したレコードを参照することにより、当該パケットを当該処理待ちキュー103にキューイングするとフロー別のパケット数(パケット数403に1を加算した値)がフロー閾値404を超えるか否かを判定する。   If the number of packets waiting to be processed> DROP threshold (“Yes” in step 703), the process proceeds to step 714, and the packet is queued in the process waiting queue 103 by referring to the record read from the flow management table 400. If it is set, it is determined whether or not the number of packets for each flow (a value obtained by adding 1 to the number of packets 403) exceeds the flow threshold value 404.

フロー別パケット数>フロー閾値 の場合(ステップ714で「Yes」)、ステップ715に処理を進めてフロー閾値404を引き下げる。ここで閾値を引き下げる単位は、システムパラメータやコマンドラインインタフェースによる入力などによって事前に与えられるものとする。続いて、閾値初期化カウンタ405の値を所定値に設定し(ステップ716)、当該パケットを破棄し(ステップ717)、統計情報テーブル500の該当する総破棄パケット数504を1だけ加算したのち(ステップ718)、処理を終了する。フロー別パケット数≦フロー閾値 の場合(ステップ714で「No」)、ステップ717に処理を進めて当該パケットを破棄し(ステップ717)、統計情報テーブル500の該当する総破棄パケット数504を1だけ加算したのち(ステップ718)、処理を終了する。   If the number of packets by flow> flow threshold (“Yes” in step 714), the process proceeds to step 715 to lower the flow threshold 404. Here, the unit for lowering the threshold is given in advance by system parameters, command line interface input, or the like. Subsequently, the value of the threshold initialization counter 405 is set to a predetermined value (step 716), the packet is discarded (step 717), and the corresponding total number of discarded packets 504 in the statistical information table 500 is incremented by 1 ( Step 718), the process ends. When the number of packets by flow ≦ the flow threshold (“No” in step 714), the process proceeds to step 717 to discard the packet (step 717), and the corresponding total number of discarded packets 504 in the statistical information table 500 is only 1. After the addition (step 718), the process is terminated.

また、処理待ちパケット数≦DROP閾値 となる場合(ステップ703で「No」)、ステップ704に処理を進め、フロー管理テーブル400から読み出したレコードを参照することにより、当該パケットを当該処理待ちキュー103にキューイングすると処理待ちパケット数(処理待ちパケット数307に1を加算した値)がRED閾値304を超えるか否かを判定する。   If the number of packets waiting to be processed ≦ DROP threshold (“No” in step 703), the process proceeds to step 704, and the record read from the flow management table 400 is referenced to place the packet in the queue for waiting for processing 103. When the number of packets waiting for processing (the value obtained by adding 1 to the number of packets waiting for processing 307) exceeds the RED threshold value 304, it is determined.

処理待ちパケット数≦RED閾値 となる場合(ステップ704で「No」)、ステップ711に処理を進めて当該パケットを当該処理待ちキュー103にキューイングする。続いて、フロー管理テーブル400の該当するフローのパケット数403を1だけ加算し(ステップ712)、キュー管理テーブル300の該当する処理待ちパケット数307を1だけ加算したのち(ステップ713)、処理を終了する。   If the number of packets waiting for processing ≦ RED threshold value (“No” in step 704), the process proceeds to step 711 and the packet is queued in the queue for processing 103. Subsequently, the packet number 403 of the corresponding flow in the flow management table 400 is added by 1 (step 712), and the corresponding processing waiting packet number 307 in the queue management table 300 is added by 1 (step 713). finish.

他方、処理待ちパケット数>RED閾値 となる場合(ステップ704で「Yes」)、ステップ705に処理を進めて、さらに、フロー管理テーブル400から読み出したレコードを参照することにより、当該パケットを当該処理待ちキュー103にキューイングするとフロー別のパケット数(パケット数403に1を加算した値)がフロー閾値404を超えるか否かを判定する。   On the other hand, if the number of packets waiting to be processed> RED threshold (“Yes” in step 704), the process proceeds to step 705, and the packet is processed by referring to the record read from the flow management table 400. When queuing in the waiting queue 103, it is determined whether or not the number of packets for each flow (a value obtained by adding 1 to the number of packets 403) exceeds the flow threshold value 404.

フロー別パケット数≦フロー閾値 の場合(ステップ705で「No」)、ステップ711に処理を進める。ステップ711以降の処理は、前記の処理待ちパケット数≦RED閾値のときと同様である。他方、フロー別パケット数>フロー閾値 の場合(ステップ705で「Yes」)、ステップ706に処理を進めて、さらに、フロー管理テーブル400から読み出したレコードを参照することにより、当該処理待ちキュー103に割り当てられているフロー数308がRED適用フロー数306を超えているか否かを判定する。   If the number of packets by flow ≦ the flow threshold (No in step 705), the process proceeds to step 711. The processing after step 711 is the same as when the number of packets waiting for processing ≦ RED threshold value. On the other hand, if the number of packets by flow> flow threshold (“Yes” in step 705), the process proceeds to step 706, and further, by referring to the record read from the flow management table 400, the process waiting queue 103 is entered. It is determined whether or not the number of assigned flows 308 exceeds the number of RED application flows 306.

フロー数≦RED適用フロー数 の場合(ステップ706で「No」)、ステップ711に処理を進める。ステップ711以降の処理は、前記の処理待ちパケット数≦RED閾値のときと同様である。フロー数>RED適用フロー数 の場合(ステップ706で「Yes」)、ステップ707に処理を進めてフロー閾値404を引き下げたのち、閾値初期化カウンタ405の値を所定値に設定する(ステップ708)。続いて、ステップ709と710とによって当該フローに対してREDアルゴリズムを適用する。   If the number of flows ≦ the number of RED application flows (“No” in step 706), the process proceeds to step 711. The processing after step 711 is the same as when the number of packets waiting for processing ≦ RED threshold value. If the number of flows> the number of RED applied flows (“Yes” in step 706), the process proceeds to step 707 to lower the flow threshold 404, and then the value of the threshold initialization counter 405 is set to a predetermined value (step 708). . Subsequently, in steps 709 and 710, the RED algorithm is applied to the flow.

この例では、まず、当該処理待ちキュー103のRED閾値304とDROP閾値303との間のランダム値を算出し(ステップ709)、現在の処理待ちパケット数307が算出したランダム値よりも大きいか否かを判定する(ステップ710)。そして、処理待ちパケット数>ランダム値 の場合(ステップ710で「Yes」)、ステップ717に処理を進めて当該パケットを破棄し、統計情報テーブル500の該当する総破棄パケット数504を1だけ加算したのち(ステップ718)、処理を終了する。また、処理待ちパケット数≦ランダム値 の場合は(ステップ710で「No」)、ステップ711に処理を進めて当該パケットを当該処理待ちキュー103にキューイングしたのち、該当するフロー別のパケット数403と処理待ちパケット数307を1ずつ加算して(ステップ712,713)処理を終了する。   In this example, first, a random value between the RED threshold value 304 and the DROP threshold value 303 of the processing waiting queue 103 is calculated (step 709), and whether or not the current processing waiting packet number 307 is larger than the calculated random value. (Step 710). If the number of packets waiting for processing> random value (“Yes” in step 710), the process proceeds to step 717 to discard the packet, and the corresponding total number of discarded packets 504 in the statistical information table 500 is incremented by one. Later (step 718), the process is terminated. If the number of packets waiting to be processed ≦ random value (“No” in step 710), the process proceeds to step 711 and the packet is queued in the queue for processing 103, and then the number of packets 403 for each corresponding flow. And the number of processing waiting packets 307 are added one by one (steps 712 and 713), and the processing is terminated.

以上がパケット振分け部102の振分け処理部と破棄処理部とが実行する一連の処理であり、パケット振分け部102は、受信キュー101に順次キューイングされる受信パケットについて、上記処理を繰り返す。   The above is a series of processing executed by the distribution processing unit and the discard processing unit of the packet distribution unit 102, and the packet distribution unit 102 repeats the above processing for the received packets sequentially queued in the reception queue 101.

続いて、図8を参照して、パケット処理部の動作を説明する。図8は、パケット処理部の動作例を示すフローチャートである。   Next, the operation of the packet processing unit will be described with reference to FIG. FIG. 8 is a flowchart illustrating an operation example of the packet processing unit.

図8に示すように、パケット処理部104は、まず、自身に対応する処理待ちキュー103にキューイングされているパケットを1つ取り出す(ステップ801)。次に、パケット処理部104は、キュー管理テーブル300の該当する処理待ちパケット数307とフロー管理テーブル400の該当するフロー別のパケット数403とをそれぞれ1ずつ減算する(ステップ802,803)。次に、パケット処理部104は、そのパケットに対してルーティング処理やプロトコル処理等の所定のパケット処理を行う(ステップ804)。パケット処理が成功した場合(ステップ805で「Yes」)、パケット処理部104は、ステップ806に処理を進めて送信キュー105にパケットをキューイングしたのち、統計情報テーブル500の該当する総送信パケット数503を1だけ加算して(ステップ807)処理を終了する。他方、パケット処理が失敗した場合は(ステップ805で「No」)、ステップ808に処理を進めて統計情報テーブルの該当する総破棄パケット数を1だけ加算したのち、処理を終了する。   As shown in FIG. 8, the packet processing unit 104 first extracts one packet queued in the processing queue 103 corresponding to itself (step 801). Next, the packet processing unit 104 subtracts 1 from the corresponding number of waiting packets 307 in the queue management table 300 and the number of packets 403 by flow in the flow management table 400 (steps 802 and 803). Next, the packet processing unit 104 performs predetermined packet processing such as routing processing and protocol processing on the packet (step 804). If the packet processing is successful (“Yes” in step 805), the packet processing unit 104 advances the processing to step 806 and queues the packet in the transmission queue 105, and then the total number of transmission packets corresponding to the statistical information table 500. 503 is incremented by 1 (step 807) and the process is terminated. On the other hand, if the packet processing has failed (“No” in step 805), the process proceeds to step 808, and the total number of discarded packets corresponding to the statistical information table is incremented by 1. Then, the process ends.

以上がパケット処理部104が実行する一連の処理であり、パケット処理部104は、自身の処理待ちキュー103に順次キューイングされるパケットについて、上記処理を繰り返す。   The above is a series of processing executed by the packet processing unit 104, and the packet processing unit 104 repeats the above-described processing for packets sequentially queued in its own processing waiting queue 103.

続いて、図9を参照してフロー閾値初期化処理について説明する。図9は、パケット振分け部におけるフロー閾値初期化処理の詳細を示すフローチャートである。図9に示す処理は、統計情報テーブル500の上書き更新を行う所定の単位時間(例えば5秒)毎に起動され、それぞれのパケット処理部104について個別に実行される。   Next, the flow threshold initialization process will be described with reference to FIG. FIG. 9 is a flowchart showing details of the flow threshold initialization processing in the packet distribution unit. The process shown in FIG. 9 is activated every predetermined unit time (for example, 5 seconds) for performing update overwriting of the statistical information table 500, and is executed individually for each packet processing unit 104.

図9に示すように、パケット振分け部102の閾値初期化処理部は、まず、統計情報テーブル500の対象となるパケット処理部104のレコードから総受信パケット数502など一連の統計情報を取得する(ステップ901)。次に、閾値初期化処理部は、総受信パケット数502から前回総受信パケット数505を減算することによって、現時点の単位時間前(前回の上書き更新時)以降に受信して振り分けた受信パケットの数である今回の受信パケット数を算出する(ステップ902)。次に、閾値初期化処理部は、算出した今回の受信パケット数が前回受信パケット数506よりも小さいか否かを判定し(ステップ903)、今回の受信パケット数が前回受信パケット数よりも小さい(図9では、「今回<前回」と表記)場合は(ステップ903で「Yes」)ステップ904に処理を進め、今回の受信パケット数が前回受信パケット数以上の場合は(ステップ903で「No」)ステップ907に処理を進める。   As shown in FIG. 9, the threshold value initialization processing unit of the packet distribution unit 102 first acquires a series of statistical information such as the total number of received packets 502 from the record of the packet processing unit 104 that is the target of the statistical information table 500 ( Step 901). Next, the threshold value initialization processing unit subtracts the previous total received packet number 505 from the total received packet number 502 to obtain the received packet that has been received and distributed after the current unit time (at the time of the last overwrite update). The current number of received packets, which is a number, is calculated (step 902). Next, the threshold value initialization processing unit determines whether or not the calculated current received packet number is smaller than the previous received packet number 506 (step 903), and the current received packet number is smaller than the previous received packet number. (In FIG. 9, “present <previous time”) (“Yes” in step 903), the process proceeds to step 904. If the current number of received packets is equal to or greater than the previous number of received packets (“No” in step 903) ]) The process proceeds to step 907.

ステップ904では、閾値初期化処理部は、当該パケット処理部104に割り当てられているフローをフロー管理テーブル400からすべて検索し、該当する閾値初期化カウンタ405の値が0でないものがあればその値を1だけ減算する。次に、減算後に閾値初期化カウンタ405の値が0となったか否かを判定し(ステップ905)、0となった場合は(ステップ905で「Yes」)ステップ906に処理を進め、フロー管理テーブル400の該当するフローのフロー閾値404の値をキュー管理テーブル300の該当する初期フロー閾値305の値に初期化する。   In step 904, the threshold value initialization processing unit searches all the flows assigned to the packet processing unit 104 from the flow management table 400, and if there is a value of the corresponding threshold value initialization counter 405 that is not 0, its value Is subtracted by 1. Next, it is determined whether or not the value of the threshold initialization counter 405 has become 0 after subtraction (step 905). If it has become 0 (“Yes” in step 905), the process proceeds to step 906, where flow management is performed. The value of the flow threshold 404 of the corresponding flow in the table 400 is initialized to the value of the corresponding initial flow threshold 305 in the queue management table 300.

ステップ907では、閾値初期化処理部は、当該パケット処理部104に該当する統計情報のうち、前回総受信パケット数505及び前回受信パケット数506を更新したのち、処理を終了する。このとき、前回総受信パケット数505には、その時点の総受信パケット数502の値を上書きして更新し、前回受信パケット数506には、ステップ902にて算出した今回の受信パケット数の値を上書きして更新する。   In step 907, the threshold value initialization processing unit updates the previous total received packet number 505 and the previous received packet number 506 in the statistical information corresponding to the packet processing unit 104, and then ends the process. At this time, the previous total received packet number 505 is updated by overwriting the value of the total received packet number 502 at that time, and the previous received packet number 506 is updated by the value of the current received packet number calculated in step 902. Overwrite and update.

以上の処理により、フロー別のパケット数が対応するフロー閾値を超えて当該フロー閾値が引き下げられたのちに、当該フローが割り当てられているパケット処理部104に振り分けられる単位時間当たりのパケット数が所定の回数だけ減少した場合に、引き下げられたフロー閾値の再設定が行われる。   With the above processing, after the number of packets for each flow exceeds the corresponding flow threshold and the flow threshold is lowered, the number of packets per unit time allocated to the packet processing unit 104 to which the flow is assigned is predetermined. When the number is decreased by the number of times, the lowered flow threshold is reset.

最後に、装置の動作に必要な各種システムパラメータの設定について説明する。図10は、コンフィグファイルにおけるシステムパラメータの記述例である。コンフィグファイルは、パケット処理装置100の起動時に不図示の不揮発性メモリなどから読み込まれる。図10に示したコンフィグファイルには、図3に例示したキュー管理テーブル300の初期設定に使用されるシステムパラメータとして、各パケット処理部104のコア番号、フロー種別、DROP閾値、RED閾値、初期フロー閾値、RED適用フロー数が記述されている。これらのシステムパラメータは、コマンドラインインタフェースのような方法により利用者などによって動的に変更されるものとしてもよい。   Finally, setting of various system parameters necessary for the operation of the apparatus will be described. FIG. 10 is a description example of system parameters in the configuration file. The configuration file is read from a non-illustrated non-volatile memory or the like when the packet processing apparatus 100 is activated. The configuration file shown in FIG. 10 includes, as system parameters used for the initial setting of the queue management table 300 illustrated in FIG. 3, the core number, flow type, DROP threshold, RED threshold, and initial flow of each packet processing unit 104. The threshold and the number of RED application flows are described. These system parameters may be dynamically changed by a user or the like by a method such as a command line interface.

以上にて、本発明の実施形態の説明を終える。なお、前記の実施形態においては、アクティブキュー管理方式としてREDアルゴリズムを適用する例について説明したが、例えば重み付きREDアルゴリズムのようにREDアルゴリズムを拡張したアルゴリズムを適用してもよいし、REDアルゴリズムとは異なる他のアクティブキュー管理アルゴリズムを適用してもよい。また、前記の実施形態においては、高トラフィックのフローのフロー閾値を動的に引き下げるものとしたが、フロー閾値を引き下げずに固定値としてもよく、その場合にはフロー管理テーブル400におけるフロー閾値404と閾値初期化カウンタ405とを省略することができる。また、フロー毎に優先度を付与してもよく、その場合には、優先度の高いフローには通常の初期フロー閾値よりも大きいフロー閾値を設定することにより、処理待ちキューにキューイング可能なパケット数を増やして優先度の高いフローのパケットを破棄しにくくするようにしてもよい。   This is the end of the description of the embodiment of the present invention. In the above-described embodiment, an example in which the RED algorithm is applied as the active queue management method has been described. However, for example, an algorithm in which the RED algorithm is extended, such as a weighted RED algorithm, may be applied. May apply other different active queue management algorithms. In the above-described embodiment, the flow threshold value of the high traffic flow is dynamically lowered. However, the flow threshold value 404 may be fixed in the flow management table 400 in this case. And the threshold initialization counter 405 can be omitted. In addition, priority may be given to each flow, and in that case, it is possible to queue to a processing queue by setting a flow threshold larger than the normal initial flow threshold for a flow with high priority. The number of packets may be increased to make it difficult to discard packets with high priority flows.

100 パケット処理装置
101 受信キュー
102 パケット振分け部(振分け処理部、破棄処理部)
103 処理待ちキュー
104 パケット処理部
105 送信キュー
106 情報保持部
200 バス
201 マルチコアCPU
202 入力IF
203 出力IF
204 メモリ
205 コア(コア#0)
206 コア(コア#1〜N)
300 キュー管理テーブル(キュー管理情報)
301 コア番号
302 フロー種別
303 DROP閾値
304 RED閾値
305 初期フロー閾値
306 RED適用フロー数(最小フロー数)
307 処理待ちパケット数
308 フロー数
309 フローリスト
400 フロー管理テーブル(フロー管理情報)
401 フロー番号
402 コア番号
403 パケット数(フロー別パケット数)
404 フロー閾値
405 閾値初期化カウンタ
500 統計情報テーブル
501 コア番号
502 総受信パケット数
503 総送信パケット数
504 総破棄パケット数
505 前回総受信パケット数
506 前回受信パケット数
100 packet processing device 101 reception queue 102 packet distribution unit (distribution processing unit, discard processing unit)
103 processing queue 104 packet processing unit 105 transmission queue 106 information holding unit 200 bus 201 multi-core CPU
202 Input IF
203 Output IF
204 Memory 205 Core (Core # 0)
206 cores (cores # 1-N)
300 Queue management table (queue management information)
301 Core number 302 Flow type 303 DROP threshold 304 RED threshold 305 Initial flow threshold 306 Number of RED application flows (minimum number of flows)
307 Number of packets waiting to be processed 308 Number of flows 309 Flow list 400 Flow management table (flow management information)
401 Flow number 402 Core number 403 Number of packets (number of packets by flow)
404 Flow threshold 405 Threshold initialization counter 500 Statistical information table 501 Core number 502 Total received packet number 503 Total transmitted packet number 504 Total discarded packet number 505 Previous total received packet number 506 Previous received packet number

Claims (6)

それぞれが処理待ちキューを有する複数のパケット処理部と、
外部から受信したパケットをキューイングする受信キューと、
この受信キューから取り出した受信パケットをいずれかの前記処理待ちキューに振り分けるパケット振分け部と、
各処理待ちキューの状態を表すキュー管理情報、及び、各パケットが属するフローの振り分け先と処理待ちのパケット数とを含むフロー管理情報を保持する情報保持部と
を備えるパケット処理装置のパケット処理方法であって、
前記パケット振分け部は、
前記受信パケットのヘッダ情報から当該パケットが含まれるフローを特定して、前記フロー管理情報を参照して同のフローに属するパケット群を同じ処理待ちキューに振り分け、
前記キュー管理情報を参照することにより、振り分け先の前記処理待ちキューにキューイングされているパケットの数が所定の閾値を超えていると判定した場合は、さらに、前記フロー管理情報を参照することにより、当該処理待ちキューに含まれる当該振り分け対象パケットと同じフローに属するパケットの数であるフロー別パケット数が所定のフロー閾値以上であるか否かを判定し、前記フロー別パケット数が前記フロー閾値以上である場合に、当該振り分け対象パケットを所定のアルゴリズムによって確率的に破棄する一方、
前記処理待ちキューに割り当てられているフロー数が前記所定のアルゴリズムを適用するための所定の最小フロー数に満たないものと判定した場合に、前記所定のアルゴリズムを適用しない
ことを特徴とするパケット処理方法。
A plurality of packet processing units each having a processing queue;
A receive queue that queues packets received from outside,
A packet distribution unit that distributes the received packet extracted from the reception queue to any of the processing queues;
A packet processing method for a packet processing device, comprising: queue management information indicating the state of each processing queue, and an information holding unit that holds flow management information including a flow distribution destination to which each packet belongs and the number of packets waiting to be processed Because
The packet distribution unit includes:
Identify the flow including the packet from the header information of the received packet, and refer to the flow management information to distribute a group of packets belonging to the same flow to the same processing queue,
If it is determined by referring to the queue management information that the number of packets queued in the processing waiting queue as a distribution destination exceeds a predetermined threshold, the flow management information is further referred to. To determine whether or not the number of packets by flow, which is the number of packets belonging to the same flow as the distribution target packet included in the processing queue, is equal to or greater than a predetermined flow threshold, and the number of packets by flow is the flow When it is equal to or greater than the threshold value, the distribution target packet is stochastically discarded by a predetermined algorithm ,
The predetermined algorithm is not applied when it is determined that the number of flows assigned to the processing queue is less than a predetermined minimum number of flows for applying the predetermined algorithm. Packet processing method.
それぞれが処理待ちキューを有する複数のパケット処理部と、
外部から受信したパケットをキューイングする受信キューと、
この受信キューから取り出した受信パケットをいずれかの前記処理待ちキューに振り分けるパケット振分け部と、
各処理待ちキューの状態を表すキュー管理情報、及び、各パケットが属するフローの振り分け先と処理待ちのパケット数とを含むフロー管理情報を保持する情報保持部と
を備えるパケット処理装置のパケット処理方法であって、
前記パケット振分け部は、
前記受信パケットのヘッダ情報から当該パケットが含まれるフローを特定して、前記フロー管理情報を参照して同のフローに属するパケット群を同じ処理待ちキューに振り分け、
前記キュー管理情報を参照することにより、振り分け先の前記処理待ちキューにキューイングされているパケットの数が所定の閾値を超えていると判定した場合は、さらに、前記フロー管理情報を参照することにより、当該処理待ちキューに含まれる当該振り分け対象パケットと同じフローに属するパケットの数であるフロー別パケット数が所定のフロー閾値以上であるか否かを判定し、前記フロー別パケット数が前記フロー閾値以上である場合に、当該振り分け対象パケットを所定のアルゴリズムによって確率的に破棄する一方、
前記フロー別パケット数が前記フロー閾値以上であると判定する毎に、当該フロー閾値を段階的に引き下げ、当該フローに属するパケットが振り分けられる前記処理待ちキューに新たにキューイングされる単位時間当たりの受信パケット数が減少する回数をカウントし、当該回数が、所定の回数に達した場合に、当該フロー閾値を所定の初期値に再設定する
ことを特徴とするパケット処理方法。
A plurality of packet processing units each having a processing queue;
A receive queue that queues packets received from outside,
A packet distribution unit that distributes the received packet extracted from the reception queue to any of the processing queues;
An information holding unit that holds queue management information indicating the status of each processing queue, and flow management information including a flow distribution destination to which each packet belongs and the number of packets waiting to be processed;
A packet processing method for a packet processing apparatus comprising:
The packet distribution unit includes:
Identify the flow including the packet from the header information of the received packet, and refer to the flow management information to distribute a group of packets belonging to the same flow to the same processing queue,
If it is determined by referring to the queue management information that the number of packets queued in the processing waiting queue as a distribution destination exceeds a predetermined threshold, the flow management information is further referred to. To determine whether or not the number of packets by flow, which is the number of packets belonging to the same flow as the distribution target packet included in the processing queue, is equal to or greater than a predetermined flow threshold, and the number of packets by flow is the flow When it is equal to or greater than the threshold value, the distribution target packet is stochastically discarded by a predetermined algorithm,
Each time it is determined that the number of packets per flow is greater than or equal to the flow threshold, the flow threshold is lowered in stages, and the packet per unit time newly queued in the processing queue to which packets belonging to the flow are distributed. A packet processing method characterized by counting the number of times the number of received packets decreases and resetting the flow threshold to a predetermined initial value when the number reaches a predetermined number .
請求項1または請求項2に記載のパケット処理方法において、
前記所定のアルゴリズムは、REDアルゴリズムまたはそれから派生した類似のアルゴリズムである
ことを特徴とするパケット処理方法。
In the packet processing method according to claim 1 or 2 ,
The packet processing method, wherein the predetermined algorithm is a RED algorithm or a similar algorithm derived therefrom.
それぞれが処理待ちキューを有する複数のパケット処理部と、
外部から受信したパケットをキューイングする受信キューと、
この受信キューから取り出した受信パケットをいずれかの前記処理待ちキューに振り分けるパケット振分け部と、
各処理待ちキューの状態を表すキュー管理情報、及び、各パケットが属するフローの振り分け先と処理待ちのパケット数とを含むフロー管理情報を保持する情報保持部と
を備え、
前記パケット振分け部は、
前記受信パケットのヘッダ情報から当該パケットが含まれるフローを特定して、前記フロー管理情報を参照して同じフローに属するパケット群を同じ処理待ちキューに振り分ける振分け処理部と、
前記キュー管理情報を参照することにより、振り分け先の前記処理待ちキューにキューイングされているパケットの数が所定の閾値を超えていると判定した場合は、さらに、前記フロー管理情報を参照することにより、当該処理待ちキューに含まれる当該振り分け対象パケットと同じフローに属するパケットの数であるフロー別パケット数が所定のフロー閾値以上であるか否かを判定し、前記フロー別パケット数が前記フロー閾値以上である場合に、当該振り分け対象パケットを所定のアルゴリズムによって確率的に破棄する破棄処理部とを有し、
前記処理待ちキューに割り当てられているフロー数が前記所定のアルゴリズムを適用するための所定の最小フロー数に満たないものと判定した場合に、前記所定のアルゴリズムを適用しない
ことを特徴とするパケット処理装置。
A plurality of packet processing units each having a processing queue;
A receive queue that queues packets received from outside,
A packet distribution unit that distributes the received packet extracted from the reception queue to any of the processing queues;
Queue management information indicating the status of each processing queue, and an information holding unit that holds flow management information including a flow distribution destination to which each packet belongs and the number of packets waiting for processing,
The packet distribution unit includes:
A distribution processing unit that identifies a flow including the packet from the header information of the received packet and distributes a group of packets belonging to the same flow to the same processing queue with reference to the flow management information;
If it is determined by referring to the queue management information that the number of packets queued in the processing waiting queue as a distribution destination exceeds a predetermined threshold, the flow management information is further referred to. To determine whether or not the number of packets by flow, which is the number of packets belonging to the same flow as the distribution target packet included in the processing queue, is equal to or greater than a predetermined flow threshold, and the number of packets by flow is the flow when the threshold value or more, have a probability to destroy cancellation processing section the distribution target packet according to a predetermined algorithm,
The predetermined algorithm is not applied when it is determined that the number of flows assigned to the processing queue is less than a predetermined minimum number of flows for applying the predetermined algorithm. A packet processing device.
それぞれが処理待ちキューを有する複数のパケット処理部と、
外部から受信したパケットをキューイングする受信キューと、
この受信キューから取り出した受信パケットをいずれかの前記処理待ちキューに振り分けるパケット振分け部と、
各処理待ちキューの状態を表すキュー管理情報、及び、各パケットが属するフローの振り分け先と処理待ちのパケット数とを含むフロー管理情報を保持する情報保持部と
を備え、
前記パケット振分け部は、
前記受信パケットのヘッダ情報から当該パケットが含まれるフローを特定して、前記フロー管理情報を参照して同じフローに属するパケット群を同じ処理待ちキューに振り分ける振分け処理部と、
前記キュー管理情報を参照することにより、振り分け先の前記処理待ちキューにキューイングされているパケットの数が所定の閾値を超えていると判定した場合は、さらに、前記フロー管理情報を参照することにより、当該処理待ちキューに含まれる当該振り分け対象パケットと同じフローに属するパケットの数であるフロー別パケット数が所定のフロー閾値以上であるか否かを判定し、前記フロー別パケット数が前記フロー閾値以上である場合に、当該振り分け対象パケットを所定のアルゴリズムによって確率的に破棄する破棄処理部と、
前記フロー別パケット数が前記フロー閾値以上であると判定する毎に、当該フロー閾値を段階的に引き下げ、当該フローに属するパケットが振り分けられる前記処理待ちキューにキューイングされる単位時間当たりの受信パケット数が減少する回数をカウントし、当該回数が所定の回数に達した場合に、当該フロー閾値を所定の初期値に再設定する閾値初
期化処理部とを有する
ことを特徴とするパケット処理装置。
A plurality of packet processing units each having a processing queue;
A receive queue that queues packets received from outside,
A packet distribution unit that distributes the received packet extracted from the reception queue to any of the processing queues;
An information holding unit that holds queue management information indicating the status of each processing queue, and flow management information including a flow distribution destination to which each packet belongs and the number of packets waiting to be processed;
With
The packet distribution unit includes:
A distribution processing unit that identifies a flow including the packet from the header information of the received packet and distributes a group of packets belonging to the same flow to the same processing queue with reference to the flow management information;
If it is determined by referring to the queue management information that the number of packets queued in the processing waiting queue as a distribution destination exceeds a predetermined threshold, the flow management information is further referred to. To determine whether or not the number of packets by flow, which is the number of packets belonging to the same flow as the distribution target packet included in the processing queue, is equal to or greater than a predetermined flow threshold, and the number of packets by flow is the flow A discard processing unit that discards the distribution target packet stochastically by a predetermined algorithm when the threshold is equal to or greater than a threshold;
Each time it is determined that the number of packets per flow is greater than or equal to the flow threshold, the flow threshold is lowered in stages, and received packets per unit time queued in the processing queue where packets belonging to the flow are distributed. The number of times the number decreases is counted, and when the number reaches the predetermined number, the flow threshold is reset to a predetermined initial value.
A packet processing apparatus , comprising: an initialization processing unit ;
請求項4または請求項5に記載のパケット処理装置において、
前記所定のアルゴリズムは、REDアルゴリズムまたはそれから派生した類似のアルゴリズムである
ことを特徴とするパケット処理装置。
In the packet processing device according to claim 4 or 5,
The packet processing apparatus, wherein the predetermined algorithm is a RED algorithm or a similar algorithm derived therefrom.
JP2011240829A 2011-11-02 2011-11-02 Packet processing method and packet processing apparatus Expired - Fee Related JP5611171B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011240829A JP5611171B2 (en) 2011-11-02 2011-11-02 Packet processing method and packet processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011240829A JP5611171B2 (en) 2011-11-02 2011-11-02 Packet processing method and packet processing apparatus

Publications (2)

Publication Number Publication Date
JP2013098815A JP2013098815A (en) 2013-05-20
JP5611171B2 true JP5611171B2 (en) 2014-10-22

Family

ID=48620313

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011240829A Expired - Fee Related JP5611171B2 (en) 2011-11-02 2011-11-02 Packet processing method and packet processing apparatus

Country Status (1)

Country Link
JP (1) JP5611171B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014241476A (en) * 2013-06-11 2014-12-25 株式会社日立製作所 Communication device and its operation mode control method
CN107645456B (en) * 2016-07-20 2021-04-30 菜鸟智能物流控股有限公司 Flow control method and flow control system
JP6802763B2 (en) * 2017-06-30 2020-12-16 アラクサラネットワークス株式会社 Relay device and bandwidth control method
JP6835758B2 (en) * 2018-02-13 2021-02-24 日本電信電話株式会社 Flow control device and method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5028431B2 (en) * 2009-01-07 2012-09-19 株式会社日立製作所 Network relay device and packet distribution method
JP2010193142A (en) * 2009-02-18 2010-09-02 Nippon Telegr & Teleph Corp <Ntt> Fair band allocation method using single buffer and multiplexer
JP5365415B2 (en) * 2009-08-25 2013-12-11 富士通株式会社 Packet relay apparatus and congestion control method

Also Published As

Publication number Publication date
JP2013098815A (en) 2013-05-20

Similar Documents

Publication Publication Date Title
US11316795B2 (en) Network flow control method and network device
US10178053B2 (en) Programmable broadband gateway hierarchical output queueing
US8553538B2 (en) Packet relay device and congestion control method
US11171891B2 (en) Congestion drop decisions in packet queues
US7292532B2 (en) Traffic shaping apparatus and traffic shaping method
US8081644B2 (en) Method and device for controlling a queue buffer
JP2003152792A (en) Device and method for transferring packet, and program
US20090010165A1 (en) Apparatus and method for limiting packet transmission rate in communication system
EP3742688A1 (en) Flow control method and apparatus
JP5611171B2 (en) Packet processing method and packet processing apparatus
US11695702B2 (en) Packet forwarding apparatus, method and program
CN113162789A (en) Method, device, equipment, system and storage medium for adjusting service level
KR101737516B1 (en) Method and apparatus for packet scheduling based on allocating fair bandwidth
JP7103883B2 (en) Communication systems, communication control methods, and communication devices
JP6982250B2 (en) Packet transfer devices, methods, and programs
US10044632B2 (en) Systems and methods for adaptive credit-based flow
US8660001B2 (en) Method and apparatus for providing per-subscriber-aware-flow QoS
US8005106B2 (en) Apparatus and methods for hybrid fair bandwidth allocation and drop precedence
US10187317B1 (en) Methods for traffic rate control and devices thereof
KR20170101537A (en) Method and aparatus of active queue management for wireless networks using shared wireless channel
CN111385667A (en) Video data processing method, device and computer readable storage medium
US20170244638A1 (en) Control apparatus, control method and control system
JP4259349B2 (en) Traffic shaping method and traffic shaping device
JP4838739B2 (en) Router buffer management method and router using the management method
KR100745679B1 (en) Method and apparatus for packet scheduling using adaptation round robin

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131114

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140519

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140527

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140725

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140826

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140902

R150 Certificate of patent or registration of utility model

Ref document number: 5611171

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees