JP4349636B2 - Packet processing apparatus and program - Google Patents

Packet processing apparatus and program Download PDF

Info

Publication number
JP4349636B2
JP4349636B2 JP2006112839A JP2006112839A JP4349636B2 JP 4349636 B2 JP4349636 B2 JP 4349636B2 JP 2006112839 A JP2006112839 A JP 2006112839A JP 2006112839 A JP2006112839 A JP 2006112839A JP 4349636 B2 JP4349636 B2 JP 4349636B2
Authority
JP
Japan
Prior art keywords
processing unit
packet
unit
reception
reception processing
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 - Lifetime
Application number
JP2006112839A
Other languages
Japanese (ja)
Other versions
JP2006238477A (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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2006112839A priority Critical patent/JP4349636B2/en
Publication of JP2006238477A publication Critical patent/JP2006238477A/en
Application granted granted Critical
Publication of JP4349636B2 publication Critical patent/JP4349636B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Description

本発明は、パケット処理装置およびプログラムに係わり、特に、通信システムの中で通信データのプロトコル処理や、経路情報に基づきパケットデータの転送処理を行なうパケット処理装置に関する。   The present invention relates to a packet processing device and a program, and more particularly to a packet processing device that performs communication data protocol processing and packet data transfer processing based on path information in a communication system.

通信回線に接続されているパケット処理装置は、データを回線上に送出するために、データをパケットメモリに格納した後、プロトコル処理部でデータをパケット化し、プロトコル処理を行う。その後、回線対応部に対して、DMA(Direct Memory Access)を用いたデータ転送を行う。
DMAにより回線対応部に転送されたパケットは、通信回線上に順次送出される。通信回線上ヘパケットが送出されたのち、送出されたパケットの保持に使用されていたパケットメモリ領域は開放される。
前記パケット転送からパケットメモリの開放に至る処理は、パケット処理装置の送信中において、固定の処理方式で行われる。
また、パケットを通信回線から受信するためには、通信回線からのパケット到着を契機として、回線対応部からDMAを用いたデータ転送を行い、到着したパケットをパケットメモリに格納する。
同時に、回線対応部は、パケット受信を通知するハードウェア割り込みを発生し、強制同期処理の起動要求を行う。その後、パケット処理装置のプロセッサは、パケットメモリ内の受信パケットを強制的にプロトコル処理部へ受渡す強制同期処理を起動し、パケットの受信処理を行う。
パケット処理装置のプロセッサは全ての受信処理が完了した後、パケットの保持に使用されていたパケットメモリの領域を開放する。前記パケットの到着からパケットメモリの開放に至る処理は、パケット処理装置の受信中において、固定の処理方式で行われる。
A packet processing apparatus connected to a communication line stores data in a packet memory and then packetizes the data in a protocol processing unit and performs protocol processing in order to send the data on the line. Thereafter, data transfer using DMA (Direct Memory Access) is performed to the line corresponding unit.
Packets transferred to the line corresponding unit by DMA are sequentially sent out on the communication line. After the packet is sent to the communication line, the packet memory area used for holding the sent packet is released.
Processing from the packet transfer to the release of the packet memory is performed by a fixed processing method during transmission of the packet processing device.
In order to receive a packet from the communication line, data transfer using DMA is performed from the line corresponding unit upon arrival of the packet from the communication line, and the arrived packet is stored in the packet memory.
At the same time, the line corresponding unit generates a hardware interrupt notifying the reception of the packet and makes a request for starting the forced synchronization process. Thereafter, the processor of the packet processing device starts a forced synchronization process for forcibly delivering the received packet in the packet memory to the protocol processing unit, and performs the packet reception process.
The processor of the packet processing device releases the area of the packet memory used for holding the packet after all reception processes are completed. Processing from the arrival of the packet to the release of the packet memory is performed by a fixed processing method during reception of the packet processing device.

なお、本願発明に関連する先行技術文献としては以下のものがある。
佐島 隆博 著,「Solaris デバイスドライバ」,オライリージャパン, 第3章,ISBN 4−87311−143−9 Ilhwan Kim,Junghwan Moon,and Heon Y.Yeom,"Timer-Based Interrupt Mitigation for High Performance Packet Processing", 5th International Conference on High-Performance Computing in the Asia-Pacfic Region, September,2001,(Gold Coast, Australia)
As prior art documents related to the invention of the present application, there are the following.
Takahiro Sajima, "Solaris Device Driver", O'Reilly Japan, Chapter 3, ISBN 4-87311-143-9 Ilhwan Kim, Junghwan Moon, and Heon Y. Yeom, "Timer-Based Interrupt Mitigation for High Performance Packet Processing", 5th International Conference on High-Performance Computing in the Asia-Pacfic Region, September, 2001, (Gold Coast, Australia)

従来のパケット処理装置では、パケットの送出は図1、パケットの受信は図2に示す構成で実現されるのが一般的である。
パケットの送出処理を表す図1では、パケット入力部11から入力されたパケットは、パケットメモリ12に格納され、送信処理部13において特定の送信処理方式で処理された後、回線対応部14にDMA転送される。
また、送信処理部13は、パケットが回線対応部14から送出された後に、送信されたパケットを保持していたパケットメモリ12の領域を開放する。
本構成において、データの送出からメモリの領域開放に至るまでの処理は、パケット処理装置の送信中で固定の送信処理方式で行われるために以下のような問題点がある。
(1)パケット処理装置のリソース消費量(プロセッサ時間、パケットメモリ)はデータの送信中に動的に変化する。
この変化に応じて、パケット処理装置のパケット処理能力が変化する一方、送信処理部13の送信処理方式はデータの送信中で固定であるため、動作中の送信処理方式が、パケット処理装置のパケット処理能力に対して適合しない場合、送信性能が低下する。
特に、パケットメモリの消費量は、プロセッサの処理速度によって、大きく変動し、プロセッサの処理能力が高い場合は、回線対応部14へのデータ転送速度が間に合わずに、パケットメモリ12を多く消費する。そのため、パケットメモリ12が不足し、送信性能を低下させる。
(2)パケット処理装置は、複数のサービスを提供する事が一般的であるが、サービス毎に送信処理部の動作で必要な特性が異なる。例えば、データ送信が、パケット処理装置の送信要求に対して、即時行われるか否か、つまりデータ送信のリアルタイム性である。
また、送信処理部13を起動するために、パケット処理装置で必要とされるリソース量の特性も提供するサービスの動作へ影響を与える。しかし、送信処理部13の送信処理方式は、データの送出中で固定であるため、動作中の送信処理方式が、サービス毎に必要とされる送信特性を満足できないことがある。
In a conventional packet processing apparatus, transmission of a packet is generally realized with the configuration shown in FIG.
In FIG. 1 showing packet transmission processing, a packet input from the packet input unit 11 is stored in the packet memory 12, processed by the transmission processing unit 13 in a specific transmission processing method, and then transmitted to the line corresponding unit 14 by the DMA. Transferred.
In addition, after the packet is transmitted from the line corresponding unit 14, the transmission processing unit 13 releases the area of the packet memory 12 that holds the transmitted packet.
In this configuration, processing from data transmission to memory area release is performed by a fixed transmission processing method during transmission of the packet processing apparatus, and thus has the following problems.
(1) The resource consumption (processor time, packet memory) of the packet processing device changes dynamically during data transmission.
In response to this change, the packet processing capability of the packet processing device changes. On the other hand, the transmission processing method of the transmission processing unit 13 is fixed during data transmission, so that the active transmission processing method is the packet of the packet processing device. If it does not match the processing capability, the transmission performance is degraded.
In particular, the consumption of the packet memory varies greatly depending on the processing speed of the processor, and when the processing capacity of the processor is high, the data transfer speed to the line correspondence unit 14 is not in time and the packet memory 12 is consumed much. For this reason, the packet memory 12 becomes insufficient and the transmission performance is reduced.
(2) The packet processing apparatus generally provides a plurality of services, but the characteristics required for the operation of the transmission processing unit differ for each service. For example, whether or not data transmission is performed immediately in response to a transmission request from the packet processing apparatus, that is, the real-time property of data transmission.
In addition, in order to activate the transmission processing unit 13, the characteristics of the amount of resources required by the packet processing device also affect the operation of the service that provides it. However, since the transmission processing method of the transmission processing unit 13 is fixed during data transmission, the transmission processing method in operation may not satisfy the transmission characteristics required for each service.

パケットの受信処理を表す図2では、回線対応部14において受信したパケットは、パケットメモリ12ヘDMA転送される。その後、回線対応部14は、強制同期処理の起動要求を行う。
受信処理部29は、前記起動要求を検知すると、強制同期処理部29aを起動しパケットメモリ内のパケットを、プロトコル処理部30に渡す。プロトコル処理部30での処理が完了した後に、受信処理部29は受信したパケットを保持していたパケットメモリ12の領域を開放する。
本構成において、データの到着からメモリの領域開放に至るまでの処理は、パケット処理装置の受信中で固定の受信処理方式で行われるために以下のような問題点がある。
(3)パケット処理装置のリソース消費量(プロセッサ時間、パケットメモリ)はデータの受信処理中に動的に変化する。
この変化に応じて、パケット処理装置のパケット処理能力が変化する一方、受信処理部29の受信処理方式はデータの受信中で固定であるため、動作中の受信処理方式が、パケット処理装置のパケット処理能力に適合しない場合、受信性能が低下する。
特に、パケットメモリ12の消費量は、通信回線上のトラヒック特性や、プロセッサの処理速度によって、大きく変動し、パケットの到着時間間隔が短い場合、パケット処理装置におけるパケットメモリ12の開放処理が間に合わず、パケットメモリ12を多く消費するため、パケットメモリ12が不足し、受信性能が低下する。
In FIG. 2 showing the packet reception process, the packet received by the line corresponding unit 14 is DMA-transferred to the packet memory 12. Thereafter, the line correspondence unit 14 makes a request for starting the forced synchronization processing.
When receiving the activation request, the reception processing unit 29 activates the forced synchronization processing unit 29 a and passes the packet in the packet memory to the protocol processing unit 30. After the processing in the protocol processing unit 30 is completed, the reception processing unit 29 releases the area of the packet memory 12 that holds the received packet.
In this configuration, the processing from the arrival of data to the release of the memory area is performed by a fixed reception processing method during reception of the packet processing apparatus, and thus has the following problems.
(3) The resource consumption (processor time, packet memory) of the packet processing device changes dynamically during the data reception process.
In response to this change, the packet processing capability of the packet processing device changes, while the reception processing method of the reception processing unit 29 is fixed during data reception, so that the active reception processing method is the packet of the packet processing device. If the processing capability is not met, the reception performance is degraded.
In particular, the amount of consumption of the packet memory 12 varies greatly depending on the traffic characteristics on the communication line and the processing speed of the processor, and when the packet arrival time interval is short, the release processing of the packet memory 12 in the packet processing device is not in time. Since a large amount of packet memory 12 is consumed, the packet memory 12 becomes insufficient and the reception performance deteriorates.

(4)通信回線上を流れるパケットのトラヒック特性は、パケット処理装置のパケット受信中にも動的に変化する。
その一方、パケット処理装置は、パケットの受信中で、特定の受信処理方式をもつ受信処理部29で処理を行うために、受信処理方式が通信回線上のトラヒック特性に適合しない場合、パケットの受信性能が低下する。
特に、パケットサイズが数バイトから数十キロバイトまでの広範囲で変化したり、パケットの到着時間間隔の変化が大きい場合には、パケットの到着を契機として起動される強制同期処理の起動回数が広範囲に変化する。このとき、プロセッサの処理能力がボトルネックとなり、受信性能が低下する。
(5)パケット処理装置は、複数のサービスを提供する場合があるが、サービス毎に受信処理部29の受信処理方式へ要求される特性が異なる。
例えば、パケットの受信に対する応答の即時性や、その受信処理方式を動作させるのに必要なパケット処理装置のリソース等である。
しかし、パケット処理装置は、パケットの受信中で特定の受信処理方式で動作する受信処理部を用いる為に、動作中の受信処理方式が提供しているサービスに適合していない場合、サービス毎に求められる受信特性を満足できないことがある。
(4) The traffic characteristics of the packets flowing on the communication line change dynamically even during packet reception by the packet processing device.
On the other hand, the packet processing apparatus performs reception by the reception processing unit 29 having a specific reception processing method during reception of the packet. If the reception processing method does not conform to the traffic characteristics on the communication line, the packet reception device receives the packet. Performance decreases.
In particular, when the packet size changes over a wide range from several bytes to several tens of kilobytes, or when there is a large change in the arrival time interval of packets, the number of times of forced synchronization processing that is started when a packet arrives is wide. Change. At this time, the processing capability of the processor becomes a bottleneck, and the reception performance decreases.
(5) Although the packet processing apparatus may provide a plurality of services, the characteristics required for the reception processing method of the reception processing unit 29 differ for each service.
For example, the immediateness of the response to the reception of the packet, the resource of the packet processing apparatus necessary for operating the reception processing method, and the like.
However, since the packet processing device uses a reception processing unit that operates in a specific reception processing method during reception of a packet, the packet processing device does not conform to the service provided by the active reception processing method. The required reception characteristics may not be satisfied.

本発明は、前記従来技術の問題点を解決するためになされたものであり、本発明の目的は、通信回線上のトラヒック特性やプロトコルの種類が変動しても、受信処理部が、適合しない受信処理方式で動作することによる受信性能の低下を起こさずに、回線上のトラヒック特性やプロトコルの種類に適合した受信処理方式を選択して動作することによって、高い受信性能を維持することが可能なパケット処理装置を提供することにある。
また、本発明の他の目的は、前述のパケット処理をコンピュータに実行させるためのプログラムを提供することにある。
本発明の前記ならびにその他の目的と新規な特徴は、本明細書の記述及び添付図面によって明らかにする。
The present invention has been made to solve the above-described problems of the prior art, and the object of the present invention is that the reception processing unit does not adapt even if the traffic characteristics and the protocol type on the communication line vary. High reception performance can be maintained by selecting and operating a reception processing method suitable for the traffic characteristics and protocol type on the line without causing a decrease in reception performance due to operation with the reception processing method. Is to provide a simple packet processing apparatus.
Another object of the present invention is to provide a program for causing a computer to execute the packet processing described above.
The above and other objects and novel features of the present invention will become apparent from the description of this specification and the accompanying drawings.

本願において開示される発明のうち、代表的なものの概要を簡単に説明すれば、下記の通りである。
即ち、本発明では、通信回線上からデータを受信する回線対応部と、受信データのプロトコル処理を実行するプロトコル処理部と、前記回線対応部で受信したデータを記憶するパケットメモリとを備えるパケット処理装置において、受信トラフィック特性に応じて、前記回線対応部がデータを受信してからプロトコル処理部を駆動するまでの時間を切り替える手段を備えることを特徴とする。
Of the inventions disclosed in this application, the outline of typical ones will be briefly described as follows.
That is, in the present invention, packet processing comprising a line corresponding unit that receives data from a communication line, a protocol processing unit that executes protocol processing of received data, and a packet memory that stores data received by the line corresponding unit. in the apparatus, in response to receiving the traffic characteristic, the line interface unit is characterized in that it comprises means for switching the time from reception of data until drive the protocol processing unit.

具体的には、トラヒックパターン取得部で、パケット処理装置が受信したデータのデータ長、データの到着時間間隔を計測し、計測値をカウンタに保持することで以下のような処理を行う。
(1)パケット処理装置に設けられたトラヒックパターン取得部で、パケット処理装置が受信したデータのデータ長、データの到着時間間隔を計測し、計測値をカウンタに保持する。
(2)統計処理部において、(1)で得られたデータ長およびデータの到着時間間隔から、ある一定期間に到着したデータの平均データ長、および平均到着時間間隔を算出し、この平均データ長と平均到着時間間隔を組み合わせて出力する。ここで、平均データ長と平均到着時間間隔をトラヒック特性とする。
(3)(2)で出力されたトラヒック特性の平均データ長と平均到着時間の値の範囲に対して、回線対応部からパケットメモリヘのデータ転送が終了した後、各々異なる遅延時間後に強制同期処理部を起動する複数の受信処理部を対応させる受信処理部テーブルをあらかじめ設定しておく。ただし、各々異なる遅延時間後に強制同期処理部を起動する複数の受信処理部の代わりに、任意の遅延時間後に強制同期処理部を起動する事が可能な単一の受信処理部と、前記遅延時間を異ならせることが可能な設定部によっても構成する事が可能である。
(4)前記トラヒック特性と前記受信処理部テーブルとを比較部において比較処理を行い、その結果に基づき、受信処理部セレクタは、パケットをプロトコル処理部へ受け渡す受信処理部の選択を行う。
(5)選択された受信処理部に対して、受信処理部切替器はパケットの送り先を設定する。
Specifically, the traffic pattern acquisition unit measures the data length of the data received by the packet processing device and the arrival time interval of the data, and stores the measured value in the counter to perform the following processing.
(1) The traffic pattern acquisition unit provided in the packet processing device measures the data length of the data received by the packet processing device and the arrival time interval of the data, and holds the measured value in the counter.
(2) The statistical processing unit calculates an average data length and an average arrival time interval of data arriving in a certain period from the data length and the data arrival time interval obtained in (1), and this average data length And the average arrival time interval. Here, the average data length and the average arrival time interval are traffic characteristics.
(3) After the data transfer from the line corresponding unit to the packet memory is completed for the range of the average data length and the average arrival time of the traffic characteristics output in (2), forced synchronization is performed after each different delay time. A reception processing unit table that associates a plurality of reception processing units that activate the processing unit is set in advance. However, instead of a plurality of reception processing units that start the forced synchronization processing unit after different delay times, a single reception processing unit that can start the forced synchronization processing unit after an arbitrary delay time, and the delay time It is also possible to configure with a setting unit capable of differentiating.
(4) The traffic characteristic and the reception processing unit table are compared in the comparison unit, and based on the result, the reception processing unit selector selects a reception processing unit that delivers the packet to the protocol processing unit.
(5) For the selected reception processing unit, the reception processing unit switch sets the destination of the packet.

本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば、下記の通りである。
本発明によれば、通信回線上を流れるパケットのトラヒックパターンが変動しても、適切な送受信処理を実行する送受信処理部を選択することによって、パケット処理装置が高い送受信特性を提供することを可能となる。

The effects obtained by the representative ones of the inventions disclosed in the present application will be briefly described as follows.
According to the present invention, even if the change traffic patterns of packets flowing on communication line, by selecting the transmission and reception processing unit that executes the appropriate transmission and reception processing, the packet processing device provides a high transmission and reception characteristics Is possible.

以下、図面を参照して本発明の実施例を詳細に説明する。
なお、実施例を説明するための全図において、同一機能を有するものは同一符号を付け、その繰り返しの説明は省略する。
[参考例1]
図3は、本発明の参考例1のパケット処理装置の概略構成を示すブロック図である。図3では、各々異なる送信処理方式で動作する送信処理部が2つの場合を示す。
同図において、14は回線対応部、15,16は、各々異なる送信処理方式で動作する送信処理部、17は送信処理部を切替える送信処理部切替器、18は送信処理部セレクタ、12はパケットメモリ、19は比較部、11はパケット入力部、20は送信処理部テーブル、21はカウンタ、22はリソース消費量取得部である。
ここで、送信処理部15は、強制メモリ開放送信処理部であり、送信処理部16は、非強制メモリ開放送信処理部であり、送信処理部(15,16)は、汎用パソコンやワークステーション上で動作するプログラムや、通信ボード上でプログラムと協調して動作するDMAコントローラ等のハードウェアで構成可能である。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
In all the drawings for explaining the embodiments, parts having the same functions are given the same reference numerals, and repeated explanation thereof is omitted.
[Reference Example 1]
FIG. 3 is a block diagram showing a schematic configuration of the packet processing apparatus according to the first embodiment of the present invention. FIG. 3 shows a case where there are two transmission processing units that operate in different transmission processing methods.
In the figure, 14 is a line corresponding unit, 15 and 16 are transmission processing units that operate in different transmission processing methods, 17 is a transmission processing unit switch for switching transmission processing units, 18 is a transmission processing unit selector, and 12 is a packet. Reference numeral 19 denotes a comparison unit, 11 a packet input unit, 20 a transmission processing unit table, 21 a counter, and 22 a resource consumption acquisition unit.
Here, the transmission processing unit 15 is a forced memory release transmission processing unit, the transmission processing unit 16 is a non-forced memory release transmission processing unit, and the transmission processing units (15, 16) are installed on a general-purpose personal computer or workstation. And a hardware such as a DMA controller that operates in cooperation with the program on the communication board.

また、送信処理部(15,16)を、単一の送信処理部と、送信処理部の動作を異ならせることが可能な設定部によっても構成することも可能である。この場合の設定部は、汎用パソコン上で動作し、通信ボード等のレジスタを設定するプログラムや、変数の値を設定するプログラムで構成可能である。
パケット入力部11、送信処理部切替器17、送信処理部セレクタ18、および比較部19は、汎用パソコン上で動作するプログラムで記述することで構成することが可能である。
パケットメモリ12は、汎用パソコンや、通信機器、通信ボード上のメモリとして構成可能である。
送信処理部テーブル20、カウンタ21は、汎用パソコン上で動作するプログラムの変数の値として、メモリ上に保持することで実現する事が可能である。また、カウンタ21は、一般的なアップダウンカウンタ等でも構成する事ができる。
リソース消費量取得部22は、ハードウェアのレジスタ読み出しや、メモリ上に保持されたカウンタ変数の読み出しを行うプログラムとして構成する事が可能である。
The transmission processing unit (15, 16) can also be configured by a single transmission processing unit and a setting unit capable of making the operation of the transmission processing unit different. In this case, the setting unit operates on a general-purpose personal computer and can be configured by a program for setting a register such as a communication board or a program for setting a variable value.
The packet input unit 11, the transmission processing unit switching unit 17, the transmission processing unit selector 18, and the comparison unit 19 can be configured by being described by a program that operates on a general-purpose personal computer.
The packet memory 12 can be configured as a general-purpose personal computer, a communication device, or a memory on a communication board.
The transmission processing unit table 20 and the counter 21 can be realized by holding them in a memory as values of variables of a program operating on a general-purpose personal computer. The counter 21 can also be configured by a general up / down counter or the like.
The resource consumption acquisition unit 22 can be configured as a program that reads hardware registers and reads counter variables held in a memory.

次に、本参考例のパケット処理装置の動作を図4を参照しながら示す。
図4は、パケット処理装置A23からパケット処理装置B24に対して、回線25と回線26をそれぞれ送信回線、受信回線として使用し、データを転送しようとしている。2つのパケット処理装置には、それぞれユニークなアドレスが付与される。
使用するアドレスは、IP(Intenet Protoco1)準拠の32bitのアドレス体系を持つものとし、パケット処理装置A23が、10.1.2.3であるとする。またデータ転送先のパケット処理装置B24は、アドレス10.1.2.4を持っている。
図5は、図3の構成において、実際の動作の様子を示す図である。
Next, the operation of the packet processing apparatus of this reference example will be described with reference to FIG.
In FIG. 4, data is transferred from the packet processing device A23 to the packet processing device B24 using the line 25 and the line 26 as a transmission line and a reception line, respectively. Each of the two packet processing devices is assigned a unique address.
Assume that an address to be used has a 32-bit address system conforming to IP (Intenet Protocol 1), and the packet processing device A23 is 10.1.2.3. The data transfer destination packet processor B24 has an address 10.1.2.4.
FIG. 5 is a diagram showing an actual operation in the configuration of FIG.

[具体的な実装例と、論理構成図との対応]
まず、本参考例の発明を、汎用パソコン上で動作しているオペレーティングシステムのネットワークドライバ部分に実装した具体例を図6に示し、本ネットワークドライバの動作を解説するとともに、その動作と図5との対応を明らかにする。
本ネットワークドライバは、汎用パソコンの拡張バスに搭載された通信カードを駆動する。
図中の番号に従い、ネットワークドライバおよび通信カードは以下の用に動作する。
(1)ステップ1
オペレーティングシステムのカーネルは、アプリケーションから送信要求のあったデータを、カーネル領域のバッファヘコピーした後、プロトコル処理、およびパケット化処理を行い、その後、ネットワークドライバの送信処理を起動する。
(2)ステップ2
ドライバは、カーネル領域で管理されている変数から、送信パケット用に確保されているバッファ量の値を読み出す。
(3)ステップ3
ドライバは、ステップ2で得た値にもとづいて、送信が終わったパケットの為に確保していたメモリの開放を行う方法を切替える。
[Correspondence between specific implementation example and logical configuration diagram]
First, a specific example in which the invention of this reference example is implemented in the network driver portion of an operating system operating on a general-purpose personal computer is shown in FIG. 6 to explain the operation of this network driver. Clarify the correspondence.
This network driver drives a communication card mounted on an expansion bus of a general-purpose personal computer.
According to the numbers in the figure, the network driver and the communication card operate for the following.
(1) Step 1
The kernel of the operating system copies the data requested for transmission from the application to the buffer in the kernel area, performs protocol processing and packetization processing, and then starts transmission processing of the network driver.
(2) Step 2
The driver reads the value of the buffer amount reserved for the transmission packet from the variable managed in the kernel area.
(3) Step 3
Based on the value obtained in step 2, the driver switches the method for releasing the memory reserved for the packet that has been transmitted.

方法としては、以下の2種類が一般的に行われている。
(A)ステップ7で、TxBDアドレスFIFO(First In First Out)に、TxBD(Buffer Descriptor for transmission)が登録されていない場合に発行されるNo TxBD割り込みを契機として開放を行う。
(B)ステップ4の前に、以前に送出したパケットの内、既に通信回線上に送出されたパケットを確保しているメモリを算出し、開放する。
以上の2種類の方法の切替えは、通信カード上の割り込みマスクレジスタをドライバから操作し、またドライバ中でどちらの方法を有効にするか指定するフラグ変数を用いる事で行われる。
(4)ステップ4
ドライバは、送信パケットを管理するTxBD(Buffer Descriptor for transmission)に、送信要求のあったパケットのアドレスを設定する。
(5)ステップ5
ドライバは、TxBDのアドレスを、通信カード上のTxBDアドレスFIFOにキューイングする。この時、TxBDアドレスFIFOの空き領域がなければ、TxBDfu11割り込みを発行する。
(6)ステップ6
通信カード上のDMAコントローラの送信可能レジスタを有効にする。
カーネル、およびドライバは、アプリケーションからデータの送信要求がある限りは、上記ステップ1からステップ6の動作を繰り返し行う。
As a method, the following two types are generally performed.
(A) In step 7, the TxBD is released with a No TxBD interrupt issued when no TxBD (Buffer Descriptor for transmission) is registered in the TxBD address FIFO (First In First Out).
(B) Before step 4, a memory that secures a packet already sent on the communication line among the previously sent packets is calculated and released.
Switching between the above two methods is performed by operating the interrupt mask register on the communication card from the driver and using a flag variable that specifies which method is to be enabled in the driver.
(4) Step 4
The driver sets the address of the packet requested to be transmitted in TxBD (Buffer Descriptor for transmission) that manages the transmission packet.
(5) Step 5
The driver queues the TxBD address in the TxBD address FIFO on the communication card. At this time, if there is no free space in the TxBD address FIFO, a TxBDfu11 interrupt is issued.
(6) Step 6
Enable the DMA controller's transmittable register on the communication card.
As long as there is a data transmission request from the application, the kernel and the driver repeatedly perform the operations from Step 1 to Step 6 described above.

以降は、通信カードが行う動作である。
(7)ステップ7
通信カードは、送信可能レジスタが有効にされると、TxBDアドレスFIFOからTxBDのアドレスを取り出す。この時、TxBDアドレスFIFOにTxBDが登録されていない場合、NoTxBD割り込みを発行する。
(8)ステップ8
ステップ7で取得したTxBDに設定されている送信パケットのアドレスを元に、パケットを、パソコンのメインメモリから通信カード上のFIFOメモリヘとDMA転送を行う。
(9)ステップ9
DMA転送が完了すると、フレーマに対して送信パケットがFIFOに転送された事が通知される。その後、フレーマは、FIFOメモリから通信回線上にパケットを送出する。
The subsequent operations are performed by the communication card.
(7) Step 7
When the transmittable register is validated, the communication card extracts the TxBD address from the TxBD address FIFO. At this time, if TxBD is not registered in the TxBD address FIFO, a NoTxBD interrupt is issued.
(8) Step 8
Based on the transmission packet address set in TxBD acquired in step 7, the packet is DMA-transferred from the main memory of the personal computer to the FIFO memory on the communication card.
(9) Step 9
When the DMA transfer is completed, the framer is notified that the transmission packet has been transferred to the FIFO. Thereafter, the framer sends a packet from the FIFO memory onto the communication line.

前述(3)でのべた2種類のメモリ開放の方法は、以下のような特徴がある。
(A)の方式では、割り込みで駆動されるために、確実にメモリ開放が行われるが、ショートパケットをバースト的に送出する場合は、割り込みが頻繁に発生するため、それに付随するスケジューリングの処理等の為にプロセッサヘの負荷が高くなり送信性能が低下する。
(B)の方式では、割り込みを用いないために、プロセッサヘの負荷が少なく、ショートパケットであっても、(A)の方式と比較して高速にパケットを送出する事が出来る。
ただし、高速なプロセッサを用いた場合、プロセッサから通信カードヘのパケット送信要求のスピードに対して、DMA転送のスピードが追い付かなくなり、バッファの開放が間に合わなくなる。この結果バッファが不足しはじめ、遂には1のステップでバッファの確保が出来なくなる。
(B)の方式では、このような状況ではバッファの開放ステップが実行されなくなるため、送信が完全に停止するデッドロックが発生するが、(A)の方式では、このような状況でも、割り込みによりバッファ開放が駆動されるため、パケットの送信を継続する事ができる。
以上の2種類の方式のそれぞれ有利な点を生かすために、本参考例では、ステップ3で、バッファの消費量を元に、2種類のメモリ開放の方法を切替えている。
図6のうち、カーネル、およびドライバという四角で囲われている部分は、パソコンのプロセッサで動作する。
図5との対応関係は、以下のようになる。
The two types of memory release methods described in (3) above have the following characteristics.
In the method (A), the memory is surely released because it is driven by an interrupt. However, when short packets are transmitted in bursts, interrupts occur frequently, so that the associated scheduling processing, etc. As a result, the load on the processor increases and transmission performance decreases.
In the method (B), since no interrupt is used, the load on the processor is small, and even a short packet can be transmitted at a higher speed than the method (A).
However, when a high-speed processor is used, the DMA transfer speed cannot keep up with the speed of the packet transmission request from the processor to the communication card, and the buffer cannot be released in time. As a result, the buffer begins to run short, and finally it becomes impossible to secure the buffer in one step.
In the method (B), since the buffer release step is not executed in such a situation, a deadlock in which transmission is completely stopped occurs. However, in the method (A), even in such a situation, an interrupt is caused. Since the buffer release is driven, packet transmission can be continued.
In order to take advantage of the advantages of the above two types of methods, in this reference example, in step 3, the two types of memory release methods are switched based on the buffer consumption.
In FIG. 6, the portions surrounded by the squares of the kernel and the driver operate on the processor of the personal computer.
The correspondence with FIG. 5 is as follows.

Figure 0004349636
Figure 0004349636

図5において、パケット入力部11から入力されたパケットは、パケットメモリ12に転送される。パケットメモリ内で、転送されるデータはプロトコルのヘッダ部分とコンテンツ部分の両方が入っているものとする。
リソース消費量取得部22では、パケットメモリ12の使用量を取得する。取得された値は、カウンタ21に保持される。
前記カウンタ21の値がとり得る範囲は、あらかじめ特定の範囲毎に分割されており、送信処理部テーブル20には、これらの分割された範囲に対して、強制メモリ開放送信処理部15、非強制メモリ開放送信処理部16が対応づけられて記述されている。
強制メモリ開放送信処理部15、非強制メモリ開放送信処理部16は、それぞれ以下のような送信処理方式で動作する。
In FIG. 5, the packet input from the packet input unit 11 is transferred to the packet memory 12. In the packet memory, it is assumed that the data to be transferred contains both the header portion and the content portion of the protocol.
The resource consumption acquisition unit 22 acquires the usage amount of the packet memory 12. The acquired value is held in the counter 21.
The range that the value of the counter 21 can take is divided in advance for each specific range, and the transmission processing unit table 20 includes the forced memory release transmission processing unit 15, the non-forced for the divided ranges. The memory release transmission processing unit 16 is described in association with it.
The forced memory release transmission processing unit 15 and the non-forced memory release transmission processing unit 16 operate by the following transmission processing methods, respectively.

強制メモリ開放送信処理部15と、回線対応部14の動作のフローチャートを図7に示す。
パケット入力部11からのパケット入力があると(ステップ101)、当該パケットをメモリ12に保持した後(ステップ102)、即時、パケットをパケットメモリ12から回線対応部14へDMA転送する(ステップ103)。
回線対応部14は、パケットを通信回線上への送出が完了すると(ステップ111)、強制メモリ開放送信処理部15の強制同期処理部15aを用いてハードウェア割り込みを発生させる。(ステップ112)
強制メモリ開放送信処理部15は、この割り込みを検知すると(ステップ104)、パケットメモリ12内の送出済パケットを確保していた領域の開放を行う(ステップ105)。
FIG. 7 shows a flowchart of operations of the forced memory release transmission processing unit 15 and the line correspondence unit 14.
When there is a packet input from the packet input unit 11 (step 101), the packet is held in the memory 12 (step 102), and immediately, the packet is DMA-transferred from the packet memory 12 to the line corresponding unit 14 (step 103). .
When the transmission of the packet onto the communication line is completed (step 111), the line corresponding unit 14 generates a hardware interrupt using the forced synchronization processing unit 15a of the forced memory release transmission processing unit 15. (Step 112)
When the forced memory release transmission processing unit 15 detects this interrupt (step 104), the forced memory release transmission processing unit 15 releases the area in the packet memory 12 where the transmitted packet has been secured (step 105).

本送信処理は、強制同期処理部15aにより、パケットメモリ12の開放を起動するために、通信回線上へのパケット送信完了後、確実にメモリ開放を行うことが出来る。
その半面、強制同期処理は、パケット処理装置のプロセッサで、高い処理優先度で動作するため、頻繁に強制同期処理部15aが起動される場合、パケット処理装置のプロセッサへの負荷が高くなり、送信性能が低下する欠点がある。
なお、一般的なパケット処理装置は、パケットを通信回線上から受信する処理も行う。その際、パケットが到着した事をパケット処理装置のプロセッサヘ通知する為にも同様の強制同期処理を行う。
この性質を利用して、パケット処理装置の受信処理における強制同期処理部15aの起動と協調して送信用のパケットメモリ12を開放する強制メモリ開放処理方式も考えられる。
具体的には、プロセッサヘの負荷を軽減するために、通信回線上へのパケットの送信が完了した事を通知する割り込みが発生しないようにしている場合においても、通信回線上からパケットを受信した時は、プロセッサでの受信処理を起動する為に割り込みが発生する。このパケット受信時の割り込みの検知と同時に送信パケットを保持するパケットメモリを開放することによって、送信完了時の割り込みを用いなくてもパケットメモリの開放を行う契機とすることができる。
また、複数の送受信インターフェースを備えるパケット処理装置では、その他のインターフェースにおいて観測された強制同期処理部15aの起動と協調してパケットメモリ12を開放する強制メモリ開放処理方式も考えられる。
具体的には、プロセッサヘの負荷を軽減するために、通信回線上へのパケットの送信が完了した事を通知する割り込みが発生しないようにしている場合においても、他の送受信インターフェースにおいて送信処理が完了したり、パケットを受信したりした場合は割り込みが発生する。この他の送受信インターフェースにおける割り込みの検知と同時に送信パケットを保持するパケットメモリを開放することによって。送信完了時の割り込みを用いなくてもパケットメモリの開放を行う契機とすることができる。
In this transmission process, since the forced synchronization processing unit 15a activates the release of the packet memory 12, the memory can be surely released after the packet transmission on the communication line is completed.
On the other hand, since the forced synchronization processing is performed with a high processing priority in the processor of the packet processing device, when the forced synchronization processing unit 15a is frequently activated, the load on the processor of the packet processing device becomes high, and transmission is performed. There is a disadvantage that the performance decreases.
A general packet processing apparatus also performs processing for receiving a packet from a communication line. At that time, the same forced synchronization processing is also performed to notify the packet processor of the arrival of the packet.
Utilizing this property, a forced memory release processing method for releasing the packet memory 12 for transmission in cooperation with the activation of the forced synchronization processing unit 15a in the reception processing of the packet processing device is also conceivable.
Specifically, in order to reduce the load on the processor, a packet was received from the communication line even when an interrupt notifying that the transmission of the packet on the communication line was completed did not occur. At times, an interrupt is generated to activate the reception process in the processor. By releasing the packet memory that holds the transmission packet simultaneously with the detection of the interrupt at the time of receiving the packet, it is possible to trigger the release of the packet memory without using the interrupt at the completion of transmission.
Further, in a packet processing device having a plurality of transmission / reception interfaces, a forced memory release processing method for releasing the packet memory 12 in cooperation with the activation of the forced synchronization processing unit 15a observed in other interfaces is also conceivable.
Specifically, in order to reduce the load on the processor, even when an interrupt notifying that the transmission of the packet on the communication line has been completed does not occur, the transmission process is not performed in other transmission / reception interfaces. An interrupt occurs when it completes or receives a packet. By releasing the packet memory holding the transmission packet simultaneously with the detection of the interrupt in the other transmission / reception interface. It is possible to trigger the release of the packet memory without using an interrupt at the completion of transmission.

非強制メモリ開放送信処理部16の動作のフローチャートを、図8に示す。
パケット入力部11からのパケット入力があると(ステップ121)、当該パケットをメモリ12に保持し(ステップ122)、回線対応部14ヘパケットを転送する前に、パケットメモリ12内の送出済パケットを確保していた領域を算出し(ステップ123)、パケットメモリ12の領域を開放する(ステップ124)。
その後、パケットをパケットメモリ12から回線対応部14へDMA転送する(ステップ125)。
本送信処理は、強制同期処理部15aを用いないので、強制メモリ開放送信処理部15と比較して、パケット処理装置のプロセッサヘの負荷を大幅に軽減させることができる。しかし、本送信処理は、メモリリソースを多く消費してしまうという欠点がある。
各送信処理部の特徴を図9に示す。
A flowchart of the operation of the non-forced memory release transmission processing unit 16 is shown in FIG.
When there is a packet input from the packet input unit 11 (step 121), the packet is held in the memory 12 (step 122), and the transmitted packet is secured in the packet memory 12 before the packet is transferred to the line corresponding unit 14. The calculated area is calculated (step 123), and the area of the packet memory 12 is released (step 124).
Thereafter, the packet is DMA-transferred from the packet memory 12 to the line corresponding unit 14 (step 125).
Since this transmission process does not use the forced synchronization processing unit 15a, the load on the processor of the packet processing device can be greatly reduced as compared with the forced memory release transmission processing unit 15. However, this transmission process has a drawback of consuming a large amount of memory resources.
The characteristics of each transmission processing unit are shown in FIG.

この状態で、比較部19、送信処理部セレクタ18の動作は以下のようになる。
(1)比較部19は、カウンタ21のカウント値と、あらかじめ設定された送信処理部テーブル20のエントリとの比較を行う。
(2)カウンタ21のカウント値は、パケットメモリ12の使用量を保持しており、ここでは、その値が全パケットメモリ12領域の50%以上とする。
(3)比較部19は、強制メモリ開放送信処理部15を選択する。
(4)送信処理部セレクタ18は、送信処理部切替器17に対して、強制メモリ開放送信処理部15を選択するように指示する。
パケット入力部11によって入力されたパケットは、強制メモリ開放送信処理部15を用いて、回線対応部14にDMA転送される。
回線対応部14は、パケットの通信回線上への送出が完了した後、強制同期処理部15aを起動し、パケットメモリ12の開放を行う。
その後、(5)カウント値が、全パケットメモリ12領域の50%未満となる。
(6)比較部19は、非強制メモリ開放送信処理部16を選択する。
(7)送信処理部セレクタ18は、送信処理部切替器17に対して、非強制メモリ開放送信処理部16を選択するように指示する。
パケット入力部11によって入力されたパケットは、非強制メモリ開放送信処理部16を用いて、送信済パケットのパケットメモリ領域を開放した後、パケットを回線対応部14にDMA転送する。
In this state, the operations of the comparison unit 19 and the transmission processing unit selector 18 are as follows.
(1) The comparing unit 19 compares the count value of the counter 21 with a preset entry in the transmission processing unit table 20.
(2) The count value of the counter 21 holds the usage amount of the packet memory 12, and here, the value is 50% or more of the entire packet memory 12 area.
(3) The comparison unit 19 selects the forced memory release transmission processing unit 15.
(4) The transmission processing unit selector 18 instructs the transmission processing unit switch 17 to select the forced memory release transmission processing unit 15.
The packet input by the packet input unit 11 is DMA-transferred to the line corresponding unit 14 using the forced memory release transmission processing unit 15.
After the transmission of the packet onto the communication line is completed, the line correspondence unit 14 activates the forced synchronization processing unit 15a to release the packet memory 12.
Thereafter, (5) the count value becomes less than 50% of the total packet memory 12 area.
(6) The comparison unit 19 selects the non-forced memory release transmission processing unit 16.
(7) The transmission processing unit selector 18 instructs the transmission processing unit switch 17 to select the non-forced memory release transmission processing unit 16.
The packet input by the packet input unit 11 uses the non-forced memory release transmission processing unit 16 to release the packet memory area of the transmitted packet, and then DMA-transfers the packet to the line corresponding unit 14.

図10に本参考例における動作例を示す。
図10において、縦方向が経過する時間を示しており、それぞれの縦線が各部の動作処理時間の経過を示す。
なお、図10は、パケット入力部11から連続してパケットメモリ12に入力されたデータパケットを、次々にパケットメモリ12から回線対応部14に出力する場合である。
パケット入力部11からのパケット送出要求の後、比較、送信処理部の切替えが行われる。
パケットメモリ12の使用率が50%以上の時、強制メモリ開放送信処理部15において送信され、回線対応部14にDMA転送される。
続くパケットのパケットメモリ12からの送出の際、再度パケットメモリ12の使用率をカウント値から読み出し、比較、送信処理部の切替えが行われる。
パケットメモリ12の使用率が50%未満となると非強制メモリ開放送信処理部16が選択され、送信が行われる。
FIG. 10 shows an operation example in this reference example.
In FIG. 10, the time in which the vertical direction elapses is shown, and each vertical line shows the elapse of the operation processing time of each part.
FIG. 10 shows a case where data packets continuously input from the packet input unit 11 to the packet memory 12 are sequentially output from the packet memory 12 to the line corresponding unit 14.
After the packet transmission request from the packet input unit 11, the comparison and the transmission processing unit are switched.
When the usage rate of the packet memory 12 is 50% or more, it is transmitted by the forced memory release transmission processing unit 15 and DMA-transferred to the line corresponding unit 14.
When the subsequent packet is transmitted from the packet memory 12, the usage rate of the packet memory 12 is read again from the count value, and the comparison and transmission processing unit are switched.
When the usage rate of the packet memory 12 becomes less than 50%, the non-forced memory release transmission processing unit 16 is selected and transmission is performed.

[参考例2]
図11は、本発明の参考例2のパケット処理装置の概略構成を示すブロック図である。なお、図11では、図5と同様に各々送信処理方式が異なる送信処理部が2つの場合を示す。
同図において、48は計算処理能力取得部である。計算処理能力取得部48は、汎用PC上で動作するプログラムや、プロセッサ上のレジスタで構成可能である。
カウンタ21は、プログラム中のカウンタ変数の値として、メモリ上に保持することで実現する事が可能である。また、一般的なアップダウンカウンタ等でも構成する事ができる。
その他の構成要素は、図5と同様である。
図11において、パケット入力部11から入力されたデータパケットは、パケットメモリ12に転送される。パケットメモリ12内で転送されるデータは、プロトコルのヘッダ部分とコンテンツ部分の両方が入っているものとする。
計算処理能力取得部48では、パケット処理装置のプロセッサの使用率を取得する。取得された値は、カウンタ21に保持される。
前記カウンタ21の値がとり得る範囲は、あらかじめ特定の範囲毎に分割されており、送信処理部テーブル49には、これらの分割された範囲に対して、強制メモリ開放送信処理部15、非強制メモリ開放送信処理部16が対応づけられて記述されている。
また、強制メモリ開放送信処理部15、非強制メモリ開放送信処理部16は、それぞれ前述の参考例1で示したものと同等のものであるとする。
[Reference Example 2]
FIG. 11 is a block diagram showing a schematic configuration of the packet processing apparatus according to the second embodiment of the present invention. FIG. 11 shows a case where there are two transmission processing units each having a different transmission processing method as in FIG.
In the figure, reference numeral 48 denotes a calculation processing capacity acquisition unit. The calculation processing capability acquisition unit 48 can be configured by a program operating on a general-purpose PC or a register on the processor.
The counter 21 can be realized by holding it in the memory as the value of the counter variable in the program. It can also be configured with a general up / down counter or the like.
Other components are the same as those in FIG.
In FIG. 11, the data packet input from the packet input unit 11 is transferred to the packet memory 12. It is assumed that the data transferred in the packet memory 12 includes both a header portion and a content portion of the protocol.
The calculation processing capacity acquisition unit 48 acquires the usage rate of the processor of the packet processing device. The acquired value is held in the counter 21.
The range that the value of the counter 21 can take is divided in advance for each specific range, and the transmission processing unit table 49 indicates that the forced memory release transmission processing unit 15, non-forced for the divided ranges. The memory release transmission processing unit 16 is described in association with it.
Further, it is assumed that the forced memory release transmission processing unit 15 and the non-forced memory release transmission processing unit 16 are the same as those shown in Reference Example 1 described above.

この状態で、比較部19、送信処理部セレクタ18の動作は以下のようになる。
(1)カウンタ21のカウント値と、あらかじめ設定された送信処理部テーブル49のエントリとの比較を行う。
(2)カウント値は、パケット処理装置のプロセッサの使用率を保持しており、ここでは、その値が50%以上とする。
(3)比較部19は、非強制メモリ開放送信処理部16を選択する。
(4)送信処理部セレクタ18は、送信処理部切替器17に対して、非強制メモリ開放送信処理部16を選択するように指示する。
パケット入力部11によって入力されたパケットは、非強制メモリ開放送信処理部16を用いて、回線対応部14にDMA転送される。
その後、(5)カウント値が、50%未満となる。
(6)比較部19は、強制メモリ開放送信処理部15を選択する。
(7)送信処理部セレクタ18は、送信処理部切替器17に対して、強制メモリ開放送信処理部15を選択するように指示する。
パケット入力部11によって入力されたパケットは、強制メモリ開放送信処理部15を用いて、回線対応部14にDMA転送される。
回線対応部14は、パケットの通信回線上への送出が完了した後、強制同期処理部15aを起動し、パケットメモリ12の開放を行う。
In this state, the operations of the comparison unit 19 and the transmission processing unit selector 18 are as follows.
(1) The count value of the counter 21 is compared with a preset entry in the transmission processing unit table 49.
(2) The count value holds the usage rate of the processor of the packet processing device, and here the value is assumed to be 50% or more.
(3) The comparison unit 19 selects the non-forced memory release transmission processing unit 16.
(4) The transmission processing unit selector 18 instructs the transmission processing unit switch 17 to select the non-forced memory release transmission processing unit 16.
The packet input by the packet input unit 11 is DMA-transferred to the line corresponding unit 14 using the non-forced memory release transmission processing unit 16.
Thereafter, (5) the count value becomes less than 50%.
(6) The comparison unit 19 selects the forced memory release transmission processing unit 15.
(7) The transmission processing unit selector 18 instructs the transmission processing unit switch 17 to select the forced memory release transmission processing unit 15.
The packet input by the packet input unit 11 is DMA-transferred to the line corresponding unit 14 using the forced memory release transmission processing unit 15.
After the transmission of the packet onto the communication line is completed, the line correspondence unit 14 activates the forced synchronization processing unit 15a to release the packet memory 12.

[参考例3]
図12は、本発明の参考例3のパケット処理装置の概略構成を示すブロック図である。なお、図12では、図5と同様に各々送信処理方式が異なる送信処理部が2つの場合を示す。
同図において、28は送出プロトコル取得部、27は送信処理部テーブル、51は統計処理部である。
送出プロトコル取得部28は、汎用PC上で動作するパターンマッチングを行なうプログラムや、パターンマッチング回路で構成可能であり、統計処理部51は、汎用PC上で動作するプログラムで構成可能である。
カウンタ21は、プログラム中のカウンタ変数の値として、メモリ上に保持することで実現する事が可能である。また、一般的なアップダウンカウンタ等でも構成する事ができる。
その他の構成要素は、図5と同様である。
図12において、パケット入力部11から入力されたデータパケットは、パケットメモリ12に転送される。パケットメモリ12内で転送されるデータは、プロトコルのヘッダ部分とコンテンツ部分の両方が入っているものとする。
送出プロトコル取得部28は、送信パケットの宛先ポート番号、または、送信元ポート番号、または、宛先ポート番号と送信元ポート番号の組合せによってプロトコルを判別し、カウンタ21において、プロトコル毎の送信パケット数を保存する。
[Reference Example 3]
FIG. 12 is a block diagram showing a schematic configuration of a packet processing apparatus according to Reference Example 3 of the present invention. Note that FIG. 12 shows a case where there are two transmission processing units each having a different transmission processing method as in FIG.
In the figure, 28 is a transmission protocol acquisition unit, 27 is a transmission processing unit table, and 51 is a statistical processing unit.
The sending protocol acquisition unit 28 can be configured by a pattern matching program that operates on a general-purpose PC or a pattern matching circuit, and the statistical processing unit 51 can be configured by a program that operates on a general-purpose PC.
The counter 21 can be realized by holding it in the memory as the value of the counter variable in the program. It can also be configured with a general up / down counter or the like.
Other components are the same as those in FIG.
In FIG. 12, the data packet input from the packet input unit 11 is transferred to the packet memory 12. It is assumed that the data transferred in the packet memory 12 includes both a header portion and a content portion of the protocol.
The transmission protocol acquisition unit 28 determines the protocol based on the destination port number of the transmission packet, the transmission source port number, or the combination of the destination port number and the transmission source port number, and the counter 21 determines the number of transmission packets for each protocol. save.

統計処理部51は、一定期間に送信した全パケット数に対する特定のプロトコルのパケット数の割合を算出し、この割合に対して閾値をあらかじめ設けている。
そして、前記カウンタ21のカウント値に基づき、ある一定期間に閾値以上の割合をしめるプロトコルを出力する。また、このとき、全てのプロトコルが閾値に満たない場合は、もっとも送出したパケット数が多いプロトコルを出力する。
送信処理部テーブル27には、各プロトコルに対応して、強制メモリ開放送信処理部15、非強制メモリ開放送信処理部16が対応づけられて記述されている。
図中のプロトコルAとプロトコルBは、それぞれ以下のような通信特性への要求条件を持つ。
プロトコルAは、送信要求に対して、即時に、パケットをパケットメモリ12から回線対応部14に送出する事が必要である。ただし、パケットメモリ12のリソースはあまり多く消費することはない。よって、非強制メモリ開放送信処理部16が適している。
プロトコルBは、送信要求に対して、即時に、パケットをパケットメモリ12から回線対応部14に送出する必要はない。ただし、パケットメモリ12のリソースを多く消費する。よって、強制メモリ開放送信処理部15が適している。
また、強制メモリ開放送信処理部15、非強制メモリ開放送信処理部16は、それぞれ前述の参考例1で示したものと同等のものであるとする。
The statistical processing unit 51 calculates the ratio of the number of packets of a specific protocol with respect to the total number of packets transmitted in a certain period, and a threshold is provided in advance for this ratio.
Based on the count value of the counter 21, a protocol for outputting a ratio equal to or higher than the threshold value for a certain period is output. At this time, if all the protocols are less than the threshold, the protocol with the largest number of transmitted packets is output.
In the transmission processing unit table 27, the forced memory release transmission processing unit 15 and the non-forced memory release transmission processing unit 16 are described in association with each protocol.
Protocol A and protocol B in the figure each have the following requirements for communication characteristics.
In response to the transmission request, the protocol A needs to send the packet from the packet memory 12 to the line corresponding unit 14 immediately. However, the resources of the packet memory 12 are not consumed much. Therefore, the non-forced memory release transmission processing unit 16 is suitable.
In response to the transmission request, the protocol B does not need to immediately send a packet from the packet memory 12 to the line corresponding unit 14. However, many resources of the packet memory 12 are consumed. Therefore, the forced memory release transmission processing unit 15 is suitable.
Further, it is assumed that the forced memory release transmission processing unit 15 and the non-forced memory release transmission processing unit 16 are the same as those shown in Reference Example 1 described above.

この状態で、比較部19、送信処理部セレクタ18の動作は以下のようになる。
(1)プロトコル毎のパケット送出数を保持するカウンタ21のカウント値に基づいて、統計処理部51の出力と、送信処理部テーブル27のエントリとの比較を行う。
(2)統計処理部51は、カウンタ21に保持されている値に基づいて、プロトコルBのパケットが、最近の1分間に送出した全パケット数の50%以上をしめると算出し、プロトコルBを出力する。
(3)比較部19は、強制メモリ開放送信処理部15を選択する。
(4)送信処理部セレクタ18は、送信処理部切替器17に対して、強制メモリ開放送信処理部15を選択するように指示する。
パケット入力部11によって入力されたパケットは、強制メモリ開放送信処理部15を用いて、回線対応部14にDMA転送される。回線対応部14は、パケットの通信回線上への送出が完了した後、強制同期処理部15aを起動し、パケットメモリ12の開放を行う。
その後、(5)統計処理部51は、カウンタ21に保持されているカウント値に基づいて、プロトコルAのパケットが、最近の1分間に送出した全パケット数の50%以上をしめると算出し、プロトコルAを出力する。
(6)比較部19は、非強制メモリ開放送信処理部16を選択する。
(7)送信処理部セレクタ18は、送信処理部切替器17に対して、非強制メモリ開放送信処理部16を選択するように指示する。
パケット入力部11によって入力されたパケットは、非強制メモリ開放送信処理部16を用いて、回線対応部14にDMA転送される。
In this state, the operations of the comparison unit 19 and the transmission processing unit selector 18 are as follows.
(1) Based on the count value of the counter 21 that holds the number of packets transmitted for each protocol, the output of the statistical processing unit 51 and the entry of the transmission processing unit table 27 are compared.
(2) Based on the value held in the counter 21, the statistical processing unit 51 calculates that the protocol B packet accounts for 50% or more of the total number of packets transmitted in the last minute, and determines the protocol B Output.
(3) The comparison unit 19 selects the forced memory release transmission processing unit 15.
(4) The transmission processing unit selector 18 instructs the transmission processing unit switch 17 to select the forced memory release transmission processing unit 15.
The packet input by the packet input unit 11 is DMA-transferred to the line corresponding unit 14 using the forced memory release transmission processing unit 15. After the transmission of the packet onto the communication line is completed, the line correspondence unit 14 activates the forced synchronization processing unit 15a to release the packet memory 12.
Thereafter, (5) based on the count value held in the counter 21, the statistical processing unit 51 calculates that the protocol A packet indicates 50% or more of the total number of packets transmitted in the last minute, Outputs protocol A.
(6) The comparison unit 19 selects the non-forced memory release transmission processing unit 16.
(7) The transmission processing unit selector 18 instructs the transmission processing unit switch 17 to select the non-forced memory release transmission processing unit 16.
The packet input by the packet input unit 11 is DMA-transferred to the line corresponding unit 14 using the non-forced memory release transmission processing unit 16.

[実施例1]
図13は、本発明の実施例1のパケット処理装置の概略構成を示すブロック図である。なお、図13では、各々異なる受信処理方式で動作する受信処理部が2つの場合を示す。
同図において、14は回線対応部、31は受信処理部テーブル、47はパケット処理装置のリソース消費量を取得するリソース消費量取得部、46はカウンタ、34はカウンタ46の値と受信処理部テーブル31を比較する比較部、35は比較部34の結果を元に受信処理部を選択する受信処理部セレクタ、36は受信処理部を切替える受信処理部切替器、40,44が各々異なる受信処理方式で動作する受信処理部、12はパケットメモリ、30はプロトコル処理部である。
受信処理部テーブル31は、汎用なパソコンやワークステーション上で動作するプログラム上の変数として保持することで実現することが出来る。
リソース消費量取得部47は、汎用なパソコン上で動作するプログラムで実現することができる。
カウンタ46は、汎用なパソコンやワークステーション上で動作するプログラム上の変数や、一般的なアップダウンカウンタを用いて実現することが出来る。その他の構成要素は、図5と同様である。
[Example 1]
FIG. 13 is a block diagram illustrating a schematic configuration of the packet processing device according to the first embodiment of this invention. FIG. 13 shows a case where there are two reception processing units that operate in different reception processing methods.
In the figure, 14 is a line corresponding unit, 31 is a reception processing unit table, 47 is a resource consumption acquisition unit that acquires the resource consumption of the packet processing device, 46 is a counter, and 34 is the value of the counter 46 and the reception processing unit table. 31 is a comparison unit that compares 31, 35 is a reception processing unit selector that selects a reception processing unit based on the result of the comparison unit 34, 36 is a reception processing unit switch that switches the reception processing unit, and 40 and 44 are different reception processing methods. A reception processing unit 12 operates, 12 is a packet memory, and 30 is a protocol processing unit.
The reception processing unit table 31 can be realized by holding it as a variable on a program that operates on a general-purpose personal computer or workstation.
The resource consumption acquisition unit 47 can be realized by a program that operates on a general-purpose personal computer.
The counter 46 can be realized by using a variable on a program that operates on a general-purpose personal computer or workstation, or a general up / down counter. Other components are the same as those in FIG.

比較部34、受信処理部セレクタ35、受信処理部切替器36は、汎用なパソコン上で動作するプログラムで記述することが可能である。
受信処理部(40,44)は、汎用パソコン上で動作するプログラムや、通信ボード上でプログラムと協調して動作するDMAコントローラ等のハードウェアで構成可能である。
また、受信処理部(40,44)を単一の受信処理部と、受信処理部の動作を異ならせることが可能な設定部によっても構成することも可能である。この場合の設定部は、汎用パソコンで動作し、通信ボード等のレジスタを設定するプログラムや、変数の値を設定するプログラムで構成可能である。
パケットメモリ12は、汎用パソコンや、通信機器、通信ボード上のメモリとして構成可能である。
図14は、図13の構成において、実際の動作の様子を示す図である。
The comparison unit 34, the reception processing unit selector 35, and the reception processing unit switching unit 36 can be described by a program that operates on a general-purpose personal computer.
The reception processing units (40, 44) can be configured by hardware such as a program that operates on a general-purpose personal computer or a DMA controller that operates in cooperation with the program on a communication board.
The reception processing unit (40, 44) can also be configured by a single reception processing unit and a setting unit capable of making the operation of the reception processing unit different. In this case, the setting unit can be configured by a program that operates on a general-purpose personal computer and sets a register such as a communication board or a program that sets a value of a variable.
The packet memory 12 can be configured as a general-purpose personal computer, a communication device, or a memory on a communication board.
FIG. 14 is a diagram showing an actual operation in the configuration of FIG.

[具体的な実装例と、論理構成図との対応]
まず、本実施例の発明を、汎用パソコン上で動作しているオペレーティングシステムのネットワークドライバ部分に実装した具体例を図15に示し、本ネットワークドライバの動作を解説するとともに、その動作と図14との対応を明らかにする。
本ネットワークドライバは、汎用パソコンの拡張バスに搭載された通信カードを駆動する。図中の番号に従い、ネットワークドライバおよび通信カードは以下のように動作する。
(1)ステップ1
オペレーティングシステムのカーネルは、受信したパケットを格納するバッファ領域を確保すると共に、受信パケットの受信状態を管理するRxBD(Buffer Descriptor for transmission)に、確保したバッファのアドレスをセットする。RxBDは、ドライバの初期化時に一定数確保され、その後、通信カードのRxBDアドレスFIFOに、一定の数だけキューイングされる。
(2)ステップ2
ドライバは、カーネル領域で管理されている変数から、受信パケット用に確保されているバッファ量の値を読みだす。
[Correspondence between specific implementation example and logical configuration diagram]
First, a specific example in which the invention of this embodiment is implemented in the network driver portion of an operating system operating on a general-purpose personal computer is shown in FIG. 15 to explain the operation of this network driver. Clarify the correspondence.
This network driver drives a communication card mounted on an expansion bus of a general-purpose personal computer. According to the numbers in the figure, the network driver and the communication card operate as follows.
(1) Step 1
The kernel of the operating system secures a buffer area for storing received packets and sets the address of the secured buffer in an RxBD (Buffer Descriptor for transmission) that manages the reception state of the received packets. A certain number of RxBDs are secured when the driver is initialized, and then a certain number is queued in the RxBD address FIFO of the communication card.
(2) Step 2
The driver reads the value of the buffer amount reserved for the received packet from the variable managed in the kernel area.

(3)ステップ3
ドライバは、ステップ2で得た値にもとづいて、パケットを受信してから、そのパケットに対してパケット処理装置のプロトコル処理を開始するまでの遅延時間を異らせる。
前記遅延時間を異らせるためには、通信カード上のハードウェアで実現されているタイマーの時間を単位時間として、何周期分の時間を遅延させるかを、ドライバが通信カードのレジスタに設定する。
通信カードは、通信回線上からパケットが到着してから、設定された時間分だけタイマーを起動し、タイマー終了後に、割り込みを発生する。
ドライバは、前記割り込みを検知すると、プロセッサに対してプロトコル処理を開始するよう要求する。
(4)ステップ4
通信カード上のDMAコントローラの受信可能レジスタを有効にする。
ドライバは、通信回線上からパケットが到着するのに先立って、前記ステップ1からステップ4の動作を行なう。
(3) Step 3
Based on the value obtained in step 2, the driver varies the delay time from when the packet is received until the protocol processing of the packet processing device is started.
In order to make the delay times different, the driver sets in the register of the communication card how many times the time is delayed with the timer time realized by the hardware on the communication card as a unit time. .
The communication card starts a timer for a set time after a packet arrives on the communication line, and generates an interrupt after the timer ends.
When the driver detects the interrupt, the driver requests the processor to start protocol processing.
(4) Step 4
Enable the DMA controller receivable register on the communication card.
The driver performs the operations from Step 1 to Step 4 before the packet arrives from the communication line.

以降は、通信カードが行なう動作である。
(5)ステップ5
通信回線上からパケットが到着する。
(6)ステップ6
パケットは、パケットのフレーミング処理を行なうフレーマに処理され通信カード上のFIFOメモリに格納される。また、フレーマは同時にDMAコントローラに対して、受信したパケットがFIFOに転送した事を通知する。
(7)ステップ7
DMAコントローラは、受信可能レジスタが有効にされていると、RxBDアドレスFIFOからRxBDのアドレスを取り出す。
(8)ステップ8
ステップ7で取得したRxBDに設定されている受信パケット格納用バッファのアドレスを元に、パケットを、通信カード上のFIFOメモリからパソコンのメインメモリヘとDMA転送を行なう。
また、DMAコントローラは同時に、RxBDに受信したパケットの長さや受信状態を表すフラグを書き込む。
(9)ステップ9
通信カードは、ステップ3で設定された遅延時間だけタイマーを起動し、タイマーの終了と同時に、RxBDに受信処理に必要な情報を書き込んだ事を示すRxBD Modify割り込みを発行する。
通信カードは、通信回線上からパケットが到着するたびに、前述のステップ6からステップ9の動作をくり返し行なう。
The following operations are performed by the communication card.
(5) Step 5
A packet arrives from the communication line.
(6) Step 6
The packet is processed by a framer that performs packet framing processing and stored in a FIFO memory on the communication card. At the same time, the framer notifies the DMA controller that the received packet has been transferred to the FIFO.
(7) Step 7
The DMA controller retrieves the RxBD address from the RxBD address FIFO when the receivable register is enabled.
(8) Step 8
Based on the received packet storage buffer address set in RxBD acquired in step 7, the packet is DMA-transferred from the FIFO memory on the communication card to the main memory of the personal computer.
At the same time, the DMA controller writes a flag indicating the length and reception state of the received packet in RxBD.
(9) Step 9
The communication card starts the timer for the delay time set in step 3, and issues an RxBD Modify interrupt indicating that information necessary for reception processing has been written to the RxBD simultaneously with the end of the timer.
Every time a packet arrives from the communication line, the communication card repeats the operations from step 6 to step 9 described above.

ステップ9で発行された割り込みは、ドライバによって検知される。
以降は、割込み検知の後のドライバで行なう動作である。
(10)ステップ10
前述のRxBD Modify割り込みを検知した後、ドライバは、受信したパケットのバッファ領域のアドレスと、RxBDとの関連付けを解除する。同時に、受信パケットのバッファアドレスは、カーネルでプロトコル処理を行なう為の所定の管理構造体にセットされる。
また、バッファ領域が切り放されたRxBDには、あらたに確保されたバッファ領域のアドレスがセットされる。このとき、受信パケットとは、ステップ9の遅延時間中にメインメモリに転送された全てのパケットを指す。
その結果、一度の割込みで、遅延時間中に到着した複数のパケットに対する処理を一括して行えるため、割込み処理が頻繁に起動することによるプロセッサヘの負荷を大幅に軽減することができる。
(11)ステップ11
その後、ドライバは、カーネルに対して、プロトコル処理を開始を要求する。プロトコル処理された受信パケットのバッファ領域は、アプリケーションのバッファ領域ヘコピーされるか、必要な処理が終了すると開放される。
The interrupt issued in step 9 is detected by the driver.
Subsequent operations are performed by the driver after detecting the interrupt.
(10) Step 10
After detecting the aforementioned RxBD Modify interrupt, the driver releases the association between the buffer area address of the received packet and the RxBD. At the same time, the buffer address of the received packet is set in a predetermined management structure for performing protocol processing in the kernel.
In addition, the newly reserved buffer area address is set in the RxBD from which the buffer area has been cut off. At this time, the received packets indicate all packets transferred to the main memory during the delay time of step 9.
As a result, processing for a plurality of packets arriving during the delay time can be performed in one batch with a single interrupt, and the load on the processor due to frequent activation of interrupt processing can be greatly reduced.
(11) Step 11
Thereafter, the driver requests the kernel to start protocol processing. The buffer area of the received packet subjected to the protocol processing is copied to the buffer area of the application or released when necessary processing is completed.

前述のステップ3で設定される遅延時間の長短によって、以下のような特徴がある。
遅延時間が長い場合には、頻繁にパケットが到着する通信回線上では、より多くのパケットが一度の割込みで処理されるため、プロセッサ負荷の削減効果が大きい。
その半面、ステップ10において、あらたな受信バッファが割り当てられるまでの遅延時間も長くなるために、メモリの消費量が大きくなり、メモリが不足する場合は受信性能が低下する。特に、到着するパケットのサイズが大幅に変化する場合、短いパケットを想定して遅延時間を長く設定すると、長いパケットが頻繁に到着した場合、メモリの不足を引き起こす。
遅延時間が短い場合には、ステップ10において、あらたな受信バッファが割り当てられるまでの遅延時間が短いので、メモリの消費量が少なく、メモリの不足による受信性能の低下は起こりにくい。
ただし、一度の割込みで処理されるパケットの数が比較的すくなくなるために、頻繁にパケットが到着する通信回線上では、プロセッサヘの負荷が高く、受信性能が低下する。特に、到着するパケットのサイズが大幅に変化する場合、長いパケットの到着を想定して、遅延時間を短く設定すると、短いパケットが頻繁に到着した場合、プロセッサヘの負荷が高くなる。
遅延時間の長短それぞれに有利な点を生かすために、本実施例では、ステップ3で、バッファの消費量を元に、遅延時間の長さを異らせている。
図15のうち、カーネル、およびドライバという四角で囲われている部分と、ステップ4は、パソコンのプロセッサで動作する。
図14との対応関係は、以下のようになる。
Depending on the length of the delay time set in step 3 described above, there are the following characteristics.
When the delay time is long, more packets are processed by a single interrupt on a communication line where packets frequently arrive, so that the effect of reducing the processor load is great.
On the other hand, in step 10, since the delay time until a new reception buffer is allocated becomes longer, the amount of memory consumption increases, and when the memory becomes insufficient, the reception performance deteriorates. In particular, when the size of the arriving packet changes significantly, if a long delay time is set assuming a short packet, a shortage of memory is caused when a long packet arrives frequently.
If the delay time is short, the delay time until a new receive buffer is assigned in step 10 is short, so that the amount of memory consumption is small, and the reception performance is hardly deteriorated due to a memory shortage.
However, since the number of packets processed by one interrupt becomes relatively small, the load on the processor is high on the communication line where packets frequently arrive, and the reception performance deteriorates. In particular, when the size of the arriving packet changes significantly, assuming that a long packet arrives and setting the delay time short, the load on the processor increases when short packets arrive frequently.
In this embodiment, in order to take advantage of the advantages and disadvantages of the delay time, in step 3, the length of the delay time is varied based on the buffer consumption.
In FIG. 15, the portion surrounded by the squares of the kernel and the driver, and step 4 operate with the processor of the personal computer.
The correspondence with FIG. 14 is as follows.

Figure 0004349636
Figure 0004349636

図14において、回線対応部14から受信したデータパケットは、パケットメモリ12に転送される。回線対応部14から受信するデータは、プロトコルのヘッダ部分とコンテンツ部分の両方が入っているものとする。
リソース消費量取得部47では、パケットメモリ12の使用量を取得する。取得されたパケットメモリの使用量はカウンタ46に保持される。
前記カウンタ46の値がとり得る範囲は、あらかじめ特定の範囲毎に分割されており、受信処理部テーブル31には、これらの分割された範囲に対して、受信処理部A(41)、受信処理部B(42)、および受信処理部C(43)の各々の受信処理部が対応づけられて記述されている。
受信処理部A(41)、受信処理部B(42)、受信処理部C(43)は、それぞれ以下のような受信処理方法の違いがある。
In FIG. 14, the data packet received from the line corresponding unit 14 is transferred to the packet memory 12. It is assumed that the data received from the line corresponding unit 14 includes both the header portion and the content portion of the protocol.
The resource consumption acquisition unit 47 acquires the usage amount of the packet memory 12. The acquired usage amount of the packet memory is held in the counter 46.
The range that the value of the counter 46 can take is divided in advance for each specific range, and the reception processing unit table 31 includes the reception processing unit A (41) and the reception processing for these divided ranges. Each reception processing unit of the part B (42) and the reception processing unit C (43) is described in association with each other.
The reception processing unit A (41), the reception processing unit B (42), and the reception processing unit C (43) have the following differences in reception processing methods.

受信処理部の動作のフローチャートを、図16に示す。
回線対応部14にパケットが到着すると(ステップ131)、当該パケットは、パケットメモリ12にDMA転送される(ステップ132)。
その後、受信処理部へ強制同期処理部の起動要求を行う(ステップ133)。
受信処理部は、前記強制同期処理部の起動要求が行われたことを検知すると(ステップ141)、一定時間の遅延処理を施した後(ステップ142)、強制同期処理を起動し(ステップ143)、パケットメモリ12内のパケットが記憶された領域のアドレスをプロトコル処理部30へ渡す(ステップ144)。
しかし、パケットの到着時間間隔が短い高速回線上では、強制同期処理の起動が頻繁に行われる為、パケット処理装置のプロセッサヘの負荷が高くなり受信性能が低下する。
この問題に対して、強制同期処理部の起動を行うまで一定時間の遅延処理を行い、遅延時間中に届いたパケットの受信を、一度の強制同期処理でまとめて行うという方法がとられる。
しかし、前記遅延時間は、到着するパケットの長さが数十バイトから数十キロバイトの様に広い範囲で変化する場合は、以下の理由より、パケットサイズの長さに応じて、適合した遅延時間が変化する。
A flowchart of the operation of the reception processing unit is shown in FIG.
When a packet arrives at the line corresponding unit 14 (step 131), the packet is DMA-transferred to the packet memory 12 (step 132).
Thereafter, a request for starting the forced synchronization processing unit is made to the reception processing unit (step 133).
When the reception processing unit detects that the activation request for the forced synchronization processing unit has been made (step 141), it performs a delay process for a predetermined time (step 142), and then starts the forced synchronization processing (step 143). Then, the address of the area where the packet in the packet memory 12 is stored is passed to the protocol processing unit 30 (step 144).
However, on a high-speed line with a short packet arrival time interval, forced synchronization processing is frequently started, which increases the load on the processor of the packet processing device and lowers reception performance.
To solve this problem, a method is adopted in which a delay process is performed for a predetermined time until the forced synchronization processing unit is activated, and reception of packets that have arrived during the delay time is performed in a single forced synchronization process.
However, when the length of the arriving packet varies over a wide range such as several tens of bytes to several tens of kilobytes, the suitable delay time depends on the length of the packet size for the following reason. Changes.

パケット長が短い場合には、割り込みが頻繁に発生するため、プロセッサの負荷が特に高くなるが、パケットメモリ12の消費量は多くないので遅延時間が長い方が良い。
パケット長が長い場合には、パケットメモリ12の消費量が大きいため、遅延時間を長くしてしまうと、パケットメモリ12が不足してしまう。よって、プロセッサの負荷が高くなっても遅延時間を長くすることが出来ない。ただし、パケット長が長い場合、もともとプロセッサの負荷は低いので遅延時間は短くてもよい。
受信処理部A(41)、受信処理部B(42)、受信処理部C(43)は異なる長さの遅延時間が設定してあり、受信処理部A(41)がもっとも短く、受信処理部C(43)になるに従い徐々に遅延時間が長くなるように設定されている。
各遅延時間の長さによって決まる受信処理部の特徴を図17に示す。
When the packet length is short, interrupts occur frequently, so the load on the processor is particularly high. However, since the amount of consumption of the packet memory 12 is not large, it is better that the delay time is long.
When the packet length is long, the consumption amount of the packet memory 12 is large. Therefore, if the delay time is lengthened, the packet memory 12 becomes insufficient. Therefore, the delay time cannot be increased even when the load on the processor increases. However, when the packet length is long, the delay time may be short because the load on the processor is originally low.
The reception processing unit A (41), the reception processing unit B (42), and the reception processing unit C (43) have different delay times, the reception processing unit A (41) is the shortest, and the reception processing unit The delay time is set to gradually increase as C (43) is reached.
The characteristics of the reception processing unit determined by the length of each delay time are shown in FIG.

この状態で、比較部34、受信処理部セレクタ35の動作は、以下のようになる。
(1)カウンタ46のカウント値と、受信処理部テーブル31のエントリとの比較を行う。
(2)カウンタ46は、リソース消費量取得部47で取得されたパケットメモリ12の使用量を保持しており、ここでは、パケットメモリ12の使用量が、全パケットメモリ12の60%以上とする。
(3)比較部34は、受信処理部B(42)を選択する。
(4)受信処理部セレクタ35は、受信処理部切替器36に対して、受信処理部B(42)を選択するように指示する。
回線対応部14に到着したパケットは、パケットメモリ12にDMA転送される。受信処理部B(42)は、設定された遅延時間が経過した後に強制同期処理部42aを起動し、パケットメモリ12内のパケットが記憶された領域のアドレスを、プロトコル処理部30へ渡す。
その後、(5)カウンタ46の値において、パケットメモリ12使用量が40%となる。(6)比較部34は、受信処理部C(43)を選択する。
(7)受信処理部セレクタ35は、受信処理部切替器36に対して、受信処理部C(43)を選択するように指示する。
この後、回線対応部14に到着したパケットは、パケットメモリ12にDMA転送され、受信処理部C(43)に設定された遅延時間が経過した後に強制同期処理部43aが起動される。
In this state, the operations of the comparison unit 34 and the reception processing unit selector 35 are as follows.
(1) The count value of the counter 46 is compared with the entry in the reception processing unit table 31.
(2) The counter 46 holds the usage amount of the packet memory 12 acquired by the resource consumption acquisition unit 47, and here, the usage amount of the packet memory 12 is 60% or more of the total packet memory 12. .
(3) The comparison unit 34 selects the reception processing unit B (42).
(4) The reception processing unit selector 35 instructs the reception processing unit switch 36 to select the reception processing unit B (42).
Packets arriving at the line corresponding unit 14 are DMA transferred to the packet memory 12. The reception processing unit B (42) activates the forced synchronization processing unit 42a after the set delay time has elapsed, and passes the address of the area in the packet memory 12 where the packet is stored to the protocol processing unit 30.
Thereafter, (5) in the value of the counter 46, the usage amount of the packet memory 12 becomes 40%. (6) The comparison unit 34 selects the reception processing unit C (43).
(7) The reception processing unit selector 35 instructs the reception processing unit switch 36 to select the reception processing unit C (43).
Thereafter, the packet arriving at the line corresponding unit 14 is DMA-transferred to the packet memory 12, and the forced synchronization processing unit 43a is activated after the delay time set in the reception processing unit C (43) has elapsed.

図18に本実施例における動作例を示す。
図18において、縦方向が経過する時間を示しており、それぞれの縦線が各部の動作処理時問の経過を示す。また、図18は、回線対応部14から連続して到着したデータパケットを、次々にパケットメモリ12ヘDMA転送し、プロトコル処理部30においてプロトコル処理を行う場合である。
回線対応部14からのパケット入力の際、前記比較、受信処理部切替えが行われる。
パケットメモリの使用率が80%の時、受信処理部A(41)において設定された時間が経過したのちに受信処理され、プロトコル処理部30ヘパケットが渡される。
続くパケット入力の際に、再度パケットメモリ12の使用率の算出が行われ、使用率が40%に変化すると同時に、受信処理部C(43)が選択され受信処理が行われる。
FIG. 18 shows an operation example in the present embodiment.
In FIG. 18, the time in which the vertical direction elapses is shown, and each vertical line shows the progress of the operation processing time of each part. FIG. 18 shows a case in which data packets continuously arriving from the line correspondence unit 14 are DMA-transferred to the packet memory 12 one after another and the protocol processing unit 30 performs protocol processing.
When a packet is input from the line corresponding unit 14, the comparison and the reception processing unit are switched.
When the usage rate of the packet memory is 80%, reception processing is performed after the time set in the reception processing unit A (41) has elapsed, and the packet is passed to the protocol processing unit 30.
At the time of subsequent packet input, the usage rate of the packet memory 12 is calculated again. At the same time when the usage rate changes to 40%, the reception processing unit C (43) is selected and the reception process is performed.

[実施例2]
図19は、本発明の実施例2のパケット処理装置の概略構成を示すブロック図である。なお、図19では、図14と同様に各々異なる受信処理方式で動作する受信処理部が3つの場合を示す。
同図において、48は計算処理能力取得部である。計算処理能力取得部48は、プロセッサのレジスタ読み出しや、一般的なパソコン上で動作するプログラムとして構成する事が可能である。
カウンタ46は、プログラム中のカウンタ変数の値として、メモリ上に保持することで実現する事が可能である。また、一般的なアップダウンカウンタ等でも構成する事ができる。
その他の構成要素は、図14と同様である。
図19において、回線対応部14から受信したデータパケットは、パケットメモリ12に転送される。回線対応部14から受信するデータは、プロトコルのヘッダ部分とコンテンツ部分の両方が入っているものとする。
計算処理能力取得部48では、パケット処理装置のプロセッサの使用率を取得する。取得された値は、カウンタ46に保持される。
前記カウンタ46の値がとり得る範囲は、あらかじめ特定の範囲毎に分割されており、受信処理部テーブル31には、これらの分割された範囲に対して、受信処理部A(41)、受信処理部B(42)、および受信処理部C(43)の各々の受信処理部が対応づけられて記述されている。
また、受信処理部A(41)、受信処理部B(42)、受信処理部C(43)は、それぞれ前述の実施例1と同様のものである。
[Example 2]
FIG. 19 is a block diagram illustrating a schematic configuration of the packet processing device according to the second embodiment of the present invention. Note that FIG. 19 shows a case where there are three reception processing units that operate in different reception processing methods, as in FIG.
In the figure, reference numeral 48 denotes a calculation processing capacity acquisition unit. The calculation processing capacity acquisition unit 48 can be configured as a register reading of a processor or a program operating on a general personal computer.
The counter 46 can be realized by holding it in the memory as the value of the counter variable in the program. It can also be configured with a general up / down counter or the like.
Other components are the same as those in FIG.
In FIG. 19, the data packet received from the line corresponding unit 14 is transferred to the packet memory 12. It is assumed that the data received from the line corresponding unit 14 includes both the header portion and the content portion of the protocol.
The calculation processing capacity acquisition unit 48 acquires the usage rate of the processor of the packet processing device. The acquired value is held in the counter 46.
The range that the value of the counter 46 can take is divided in advance for each specific range, and the reception processing unit table 31 includes the reception processing unit A (41) and the reception processing for these divided ranges. Each reception processing unit of the part B (42) and the reception processing unit C (43) is described in association with each other.
The reception processing unit A (41), the reception processing unit B (42), and the reception processing unit C (43) are the same as those in the first embodiment.

この状態で、比較部34、受信処理部セレクタ35の動作は、以下のようになる。
(1)カウンタ46のカウント値と、受信処理部テーブル31のエントリとの比較を行う。
(2)ここでは、プロセッサの使用率が、60%以上とする。
(3)比較部34は、受信処理部B(42)を選択する。
(4)受信処理部セレクタ35は、受信処理部切替器36に対して、受信処理部B(42)を選択するように指示する。
回線対応部14に到着したパケットは、パケットメモリ12にDMA転送される。受信処理部B(42)は、設定された遅延時間が経過した後に強制同期処理部42aを起動し、パケットメモリ12内の受信したパケットが記憶された領域のアドレスを、プロトコル処理部30へ渡す。
その後、(5)プロセッサの使用率が40%となるものとする。
(6)比較部34は、受信処理部A(41)を選択する。
(7)受信処理部セレクタ35は、受信処理部切替器36に対して、受信処理部A(41)を選択するように指示する。
この後、回線対応部14に到着したパケットは、パケットメモリ12にDMA転送され、受信処理部A(41)に設定された遅延時間が経過した後に強制同期処理部43aが起動される。
In this state, the operations of the comparison unit 34 and the reception processing unit selector 35 are as follows.
(1) The count value of the counter 46 is compared with the entry in the reception processing unit table 31.
(2) Here, the usage rate of the processor is 60% or more.
(3) The comparison unit 34 selects the reception processing unit B (42).
(4) The reception processing unit selector 35 instructs the reception processing unit switch 36 to select the reception processing unit B (42).
Packets arriving at the line corresponding unit 14 are DMA transferred to the packet memory 12. The reception processing unit B (42) activates the forced synchronization processing unit 42a after the set delay time has elapsed, and passes the address of the area where the received packet is stored in the packet memory 12 to the protocol processing unit 30. .
Thereafter, (5) the processor usage rate is assumed to be 40%.
(6) The comparison unit 34 selects the reception processing unit A (41) .
(7) The reception processing unit selector 35 instructs the reception processing unit switch 36 to select the reception processing unit A (41) .
Thereafter, the packet arriving at the line corresponding unit 14 is DMA-transferred to the packet memory 12, and the forced synchronization processing unit 43a is activated after the delay time set in the reception processing unit A (41) has elapsed.

[実施例3]
図20は、本発明の実施例3のパケット処理装置の概略構成を示すブロック図である。なお、図20では、図14と同様に各々異なる受信処理方式で動作する受信処理部が3つの場合を示す。
同図において、45は受信プロトコル取得部、50は統計処理部である。
受信プロトコル取得部45は、汎用PC上で動作するパターンマッチングを行なうプログラムや、パターンマッチング回路で構成可能であり、統計処理部51は、汎用PC上で動作するプログラムで構成可能である。
カウンタ46は、プログラム中のカウンタ変数の値として、メモリ上に保持することで実現する事が可能である。また、一般的なアップダウンカウンタ等でも構成する事ができる。その他の構成要素は、図14と同様である。
図20において、回線対応部14から受信したデータパケットは、パケットメモリ12に転送される。回線対応部14から受信するデータは、プロトコルのヘッダ部分とコンテンツ部分の両方が入っているものとする。
受信プロトコル取得部45は、受信パケットの宛先ポート番号、または、送信元ポート番号、または、宛先ポート番号と送信元ポート番号の組合せによってプロトコルを判別し、カウンタ46で、プロトコル毎の受信パケット数を記憶する。
[Example 3]
FIG. 20 is a block diagram illustrating a schematic configuration of the packet processing apparatus according to the third embodiment of this invention. Note that FIG. 20 illustrates a case where there are three reception processing units that operate in different reception processing methods, similarly to FIG.
In the figure, 45 is a reception protocol acquisition unit, and 50 is a statistical processing unit.
The reception protocol acquisition unit 45 can be configured with a program for performing pattern matching that operates on a general-purpose PC or a pattern matching circuit, and the statistical processing unit 51 can be configured with a program that operates on a general-purpose PC.
The counter 46 can be realized by holding it in the memory as the value of the counter variable in the program. It can also be configured with a general up / down counter or the like. Other components are the same as those in FIG.
In FIG. 20, the data packet received from the line corresponding unit 14 is transferred to the packet memory 12. It is assumed that the data received from the line corresponding unit 14 includes both the header portion and the content portion of the protocol.
The reception protocol acquisition unit 45 determines the protocol based on the destination port number of the received packet, the source port number, or a combination of the destination port number and the source port number, and the counter 46 determines the number of received packets for each protocol. Remember.

統計処理部50は、一定期間に受信した全パケット数に対する特定のプロトコルのパケット数の割合を算出し、この割合に対して閾値をあらかじめ設けている。
そして、前記カウンタ46の値に基づき、ある一定期間に閾値以上の割合をしめるプロトコルを出力する。また、このとき、全てのプロトコルが閾値に満たない場合は、もっとも受信したパケット数が多いプロトコルを出力する。
受信処理部テーブル31には、登録されている各プロトコルに対して受信処理部が対応づけられて記述されている。
プロトコルA、プロトコルはそれぞれ以下のような受信特性への要求条件を持つ。
プロトコルAは、受信パケットに対する即時応答性が要求される。プロセッサでの処理は少ない。よって、遅延処理時間が短い受信処理部A(41)が適する。
プロトコルは、受信パケットに対して即時応答性は要求しないが、プロセッサで行う処理が多い。よって、遅延処理時間が長い受信処理部C(43)が適する。
また、受信処理部A(41)、受信処理部B(42)、受信処理部C(43)は、それぞれ前述の実施例1と同様のものである。
The statistical processing unit 50 calculates the ratio of the number of packets of a specific protocol with respect to the total number of packets received in a certain period, and a threshold is provided in advance for this ratio.
Then, based on the value of the counter 46, a protocol that outputs a ratio equal to or higher than a threshold value for a certain period is output. At this time, if all the protocols are less than the threshold value, the protocol having the largest number of received packets is output.
In the reception processing unit table 31, a reception processing unit is described in association with each registered protocol.
Protocol A and protocol C each have the following requirements for reception characteristics.
Protocol A requires immediate responsiveness to received packets. There is little processing in the processor. Therefore, the reception processing unit A (41) with a short delay processing time is suitable.
Protocol C does not require immediate responsiveness to received packets, but many processes are performed by the processor. Therefore, the reception processing unit C (43) with a long delay processing time is suitable.
The reception processing unit A (41), the reception processing unit B (42), and the reception processing unit C (43) are the same as those in the first embodiment.

この状態で、比較部34、受信処理部セレクタ35の動作は、以下のようになる。
(1)プロトコル毎のパケット受信数を保持するカウンタ46のカウント値に基づいて、統計処理部50の出力と、受信処理部テーブル31のエントリとの比較を行う。
(2)統計処理部50は、カウンタ46に保持されている値に基づいて、プロトコルAのパケットが、最近の1分間に受信した全パケット数の50%以上をしめると算出し、プロトコルAを出力する。
(3)比較部34は、受信処理部A(41)を選択する。
(4)受信処理部セレクタ35は、受信処理部切替器36に対して、受信処理部A(41)を選択するように指示する。
回線対応部14に到着したパケットは、パケットメモリ12にDMA転送される。受信処理部A(41)は、設定された遅延時間が経過した後に強制同期処理部41aを起動し、パケットメモリ12内の受信したパケットが記憶された領域のアドレスを、プロトコル処理部30へ渡す。
その後、(5)統計処理部50は、カウンタ46に保持されているカウント値に基づいて、プロトコルのパケットが、最近の1分間に受信した全パケット数の50%以上をしめると算出し、プロトコルを出力する。
(6)比較部34は、受信処理部C(43)を選択する。
(7)受信処理部セレクタ35は、受信処理部切替器36に対して、受信処理部C(43)を選択するように指示する。
この後、回線対応部14に到着したパケットは、パケットメモリ12にDMA転送され、受信処理部C(43)に設定された遅延時間が経過した後に強制同期処理部43aが起動される。
In this state, the operations of the comparison unit 34 and the reception processing unit selector 35 are as follows.
(1) Based on the count value of the counter 46 that holds the number of received packets for each protocol, the output of the statistical processing unit 50 and the entry of the reception processing unit table 31 are compared.
(2) Based on the value held in the counter 46, the statistical processing unit 50 calculates that the protocol A packet indicates 50% or more of the total number of packets received in the last minute, and determines the protocol A Output.
(3) The comparison unit 34 selects the reception processing unit A (41).
(4) The reception processing unit selector 35 instructs the reception processing unit switch 36 to select the reception processing unit A (41).
Packets arriving at the line corresponding unit 14 are DMA transferred to the packet memory 12. The reception processing unit A (41) activates the forced synchronization processing unit 41a after the set delay time elapses, and passes the address of the area where the received packet is stored in the packet memory 12 to the protocol processing unit 30. .
Thereafter, (5) based on the count value held in the counter 46, the statistical processing unit 50 calculates that the protocol C packets represent 50% or more of the total number of packets received in the last minute, Outputs protocol C.
(6) The comparison unit 34 selects the reception processing unit C (43) .
(7) The reception processing unit selector 35 instructs the reception processing unit switch 36 to select the reception processing unit C (43) .
Thereafter, the packet arriving at the line corresponding unit 14 is DMA-transferred to the packet memory 12, and the forced synchronization processing unit 43a is activated after the delay time set in the reception processing unit C (43) has elapsed.

[実施例4]
図21は、本発明の実施例4のパケット処理装置の概略構成を示すブロック図である。なお、図21では、図14と同様に各々異なる受信処理方式で動作する受信処理部が3つの場合を示す。
同図において、39はトラヒックパターン情報取得部である。トラヒックパターン情報取得部39は、通信ボードの持つパケット到着時間解析機能や、受信パケット長解析機能により実現する事ができる。また、汎用的なパソコンで動作するプログラムにおいて変数を調査することでも実現することが出来る。
カウンタ46は、プログラム中のカウンタ変数の値として、メモリ上に保持することで実現する事が可能である。また、一般的なアップダウンカウンタ等でも構成する事ができる。その他の構成要素は、図14と同様である。
図21において、回線対応部14から受信したデータパケットは、パケットメモリ12に転送される。回線対応部14から受信するデータは、プロトコルのヘッダ部分とコンテンツ部分の両方が入っているものとする。
トラヒックパターン情報取得部39では、回線対応部14から受信したデータパケットの到着時間間隔とパケットの長さを取得し、カウンタ46に記憶される。
統計処理部50は、トラヒック特性をいくつかのトラヒックパターンにあらかじめ分類しておき、前記カウンタ46の値に基づきトラヒック特性(ここでは、平均パケット長、平均到着時間間隔)を算出し、トラヒックパターンのいずれかに当てはめて、このパターンの値を出力する。
受信処理部テーブル31には、登録されている各トラヒック特性に対して適用する受信処理部が対応づけられて記述されている。
また、受信処理部A(41)、受信処理部B(42)、受信処理部C(43)は、それぞれ前述の実施例1と同様のものである。
[Example 4]
FIG. 21 is a block diagram showing a schematic configuration of the packet processing apparatus according to the fourth embodiment of the present invention. Note that FIG. 21 shows a case where there are three reception processing units that operate in different reception processing methods as in FIG.
In the figure, reference numeral 39 denotes a traffic pattern information acquisition unit. The traffic pattern information acquisition unit 39 can be realized by a packet arrival time analysis function or a received packet length analysis function of the communication board. It can also be realized by examining variables in a program that runs on a general-purpose personal computer.
The counter 46 can be realized by holding it in the memory as the value of the counter variable in the program. It can also be configured with a general up / down counter or the like. Other components are the same as those in FIG.
In FIG. 21, the data packet received from the line corresponding unit 14 is transferred to the packet memory 12. It is assumed that the data received from the line corresponding unit 14 includes both the header portion and the content portion of the protocol.
The traffic pattern information acquisition unit 39 acquires the arrival time interval and the packet length of the data packet received from the line correspondence unit 14 and stores them in the counter 46.
The statistical processing unit 50 classifies the traffic characteristics into several traffic patterns in advance, calculates the traffic characteristics (here, average packet length, average arrival time interval) based on the value of the counter 46, and determines the traffic pattern The value of this pattern is output by applying to either.
The reception processing unit table 31 describes a reception processing unit to be applied to each registered traffic characteristic.
The reception processing unit A (41), the reception processing unit B (42), and the reception processing unit C (43) are the same as those in the first embodiment.

この状態で、比較部34、受信処理部セレクタ35の動作は、以下のようになる。
(1)統計処理部50の出力と、受信処理部テーブル31のエントリとの比較を行う。
(2)統計処理部50は、カウンタ46に保持されているカウント値に基づいて、最近1分間の受信パケットの平均パケット長が1500byte、平均到着時間間隔が200msecであると算出し、この値はトラヒックパターンAに相当すると判断する。
(3)比較部34は、受信処理部A(41)を選択する。
(4)受信処理部セレクタ35は、受信処理部切替器36に対して、受信処理部A(41)を選択するように指示する。
回線対応部14に到着したパケットは、パケットメモリ12にDMA転送される。受信処理部A(41)は、設定された遅延時間が経過した後に強制同期処理部41aを起動し、パケットメモリ12内の受信したパケットが記載された領域のアドレスを、プロトコル処理部30へ渡す。
その後、(5)統計処理部50は、最近1分問の受信パケットの平均パケット長が250byte、平均到着時間間隔が10msecであると算出し、この値はトラヒックパターンBに相当すると判断する。
(6)比較部34は、受信処理部B(42)を選択する。
(7)受信処理部セレクタ35は、受信処理部切替器36に対して、受信処理部B(42)を選択するように指示する。
この後、回線対応部14に到着したパケットは、パケットメモリ12にDMA転送され、受信処理部B(42)に設定された遅延時間が経過した後に強制同期処理部42aが起動される。
以上、本発明者によってなされた発明を、前記実施例に基づき具体的に説明したが、本発明は、前記実施例に限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能であることは勿論である。
In this state, the operations of the comparison unit 34 and the reception processing unit selector 35 are as follows.
(1) The output of the statistical processing unit 50 is compared with the entry of the reception processing unit table 31.
(2) Based on the count value held in the counter 46, the statistical processing unit 50 calculates that the average packet length of the received packets in the last one minute is 1500 bytes and the average arrival time interval is 200 msec. It is determined that it corresponds to the traffic pattern A.
(3) The comparison unit 34 selects the reception processing unit A (41).
(4) The reception processing unit selector 35 instructs the reception processing unit switch 36 to select the reception processing unit A (41).
Packets arriving at the line corresponding unit 14 are DMA transferred to the packet memory 12. The reception processing unit A (41) activates the forced synchronization processing unit 41a after the set delay time has elapsed, and passes the address of the area in which the received packet is written in the packet memory 12 to the protocol processing unit 30. .
Thereafter, (5) the statistical processing unit 50 calculates that the average packet length of the most recently received packet is 250 bytes and the average arrival time interval is 10 msec, and determines that this value corresponds to the traffic pattern B.
(6) The comparison unit 34 selects the reception processing unit B (42).
(7) The reception processing unit selector 35 instructs the reception processing unit switch 36 to select the reception processing unit B (42).
Thereafter, the packet arriving at the line corresponding unit 14 is DMA-transferred to the packet memory 12, and the forced synchronization processing unit 42a is activated after the delay time set in the reception processing unit B (42) has elapsed.
As mentioned above, the invention made by the present inventor has been specifically described based on the above embodiments. However, the present invention is not limited to the above embodiments, and various modifications can be made without departing from the scope of the invention. Of course.

従来のパケット処理装置の送信処理を説明するための図である。It is a figure for demonstrating the transmission process of the conventional packet processing apparatus. 従来のパケット処理装置の受信処理を説明するための図である。It is a figure for demonstrating the reception process of the conventional packet processing apparatus. 本発明の参考例1のパケット処理装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the packet processing apparatus of the reference example 1 of this invention. 本発明の参考例1のパケット処理装置の接続構成を説明するための図である。It is a figure for demonstrating the connection structure of the packet processing apparatus of the reference example 1 of this invention. 図3の構成において、実際の動作の様子を示す図である。FIG. 4 is a diagram showing a state of actual operation in the configuration of FIG. 3. 本発明の参考例1のパケット処理装置を汎用のコンピュータ上で構成した場合を示す図である。It is a figure which shows the case where the packet processing apparatus of the reference example 1 of this invention is comprised on a general purpose computer. 図5に示す強制メモリ開放送信処理部の動作を説明するフローチャートである。It is a flowchart explaining operation | movement of the forced memory release transmission process part shown in FIG. 図5に示す非強制メモリ開放送信処理部の動作を説明するフローチャートである。It is a flowchart explaining the operation | movement of the non-forced memory open | release transmission process part shown in FIG. 図5に示す各送信処理部の特徴を説明する図である。It is a figure explaining the characteristic of each transmission process part shown in FIG. 本発明の参考例1のパケット処理装置の動作例を示す図である。It is a figure which shows the operation example of the packet processing apparatus of the reference example 1 of this invention. 本発明の参考例2のパケット処理装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the packet processing apparatus of the reference example 2 of this invention. 本発明の参考例3のパケット処理装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the packet processing apparatus of the reference example 3 of this invention. 本発明の実施例1のパケット処理装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the packet processing apparatus of Example 1 of this invention. 図13の構成において、実際の動作の様子を示す図である。It is a figure which shows the mode of an actual operation | movement in the structure of FIG. 本発明の実施例1のパケット処理装置を汎用のコンピュータ上で構成した場合を示す図である。It is a figure which shows the case where the packet processing apparatus of Example 1 of this invention is comprised on a general purpose computer. 図14に示す受信処理部の動作を説明するフローチャートである。It is a flowchart explaining operation | movement of the reception process part shown in FIG. 図14に示す各受信処理部の特徴を説明する図である。It is a figure explaining the characteristic of each reception process part shown in FIG. 本発明の実施例1のパケット処理装置の動作例を示す図である。It is a figure which shows the operation example of the packet processing apparatus of Example 1 of this invention. 本発明の実施例2のパケット処理装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the packet processing apparatus of Example 2 of this invention. 本発明の実施例3のパケット処理装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the packet processing apparatus of Example 3 of this invention. 本発明の実施例4のパケット処理装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the packet processing apparatus of Example 4 of this invention.

符号の説明Explanation of symbols

11 パケット入力部
12 パケットメモリ
13 送信処理部
14 回線対応部
15 強制メモリ開放送信処理部
15a,29a,40a,41a,42a,43a,44a 強制同期処理部
16 非強制メモリ開放送信処理部
17 送信処理部切替器
18 送信処理部セレクタ
19,34 比較部
20,27,49 送信処理部テーブル
21,46 カウンタ
22,47 リソース消費量取得部
23 パケット処理装置A
24 パケット処理装置B
25 送信用回線
26 受信用回線
28 送出プロトコル取得部
29,40,44 受信処理部
30 プロトコル処理部
31 受信処理部テーブル
35 受信処理部セレクタ
36 受信処理部切替器
39 トラヒックパターン情報取得部
41 受信処理部A
42 受信処理部B
43 受信処理部C
45 受信プロトコル取得部
48 計算処理能力取得部
50,51 統計処理部
DESCRIPTION OF SYMBOLS 11 Packet input part 12 Packet memory 13 Transmission process part 14 Line | wire corresponding | compatible part 15 Forced memory release transmission process part 15a, 29a, 40a, 41a, 42a, 43a, 44a Forced synchronous process part 16 Non-forced memory release transmission process part 17 Transmission process Unit switch 18 Transmission processing unit selector 19, 34 Comparison unit 20, 27, 49 Transmission processing unit table 21, 46 Counter 22, 47 Resource consumption acquisition unit 23 Packet processing device A
24 Packet processing device B
25 Transmission Line 26 Reception Line 28 Transmission Protocol Acquisition Units 29, 40, 44 Reception Processing Unit 30 Protocol Processing Unit 31 Reception Processing Unit Table 35 Reception Processing Unit Selector 36 Reception Processing Unit Switcher 39 Traffic Pattern Information Acquisition Unit 41 Reception Processing Part A
42 Reception Processing Unit B
43 Reception processing unit C
45 Receiving protocol acquisition unit 48 Calculation processing capability acquisition unit 50, 51 Statistical processing unit

Claims (2)

通信回線上からデータを受信する回線対応部と、
前記回線対応部で受信したデータを記憶するパケットメモリと、
前記回線対応部で受信したデータのプロトコル処理を行うプロトコル処理部と、
前記プロトコル処理部を強制的に起動する強制同期処理部と、
前記回線対応部から前記パケットメモリヘのデータ転送が終了した後に各々異なる遅延時間後に前記強制同期処理部を起動する複数の受信処理部と、
パケット処理装置が受信したデータのデータ長、データの到着時間間隔を計測するトラヒックパターン取得部と、
前記トラヒックパターン取得部で計測された前記データ長とデータの到着時間間隔を保持するカウンタと、
前記カウンタのカウント値から通信回線上のトラヒック特性を推定する統計処理部と、
前記統計処理部の出力値に対して、前記各々異なる遅延時間後に前記強制同期処理部を起動する複数の受信処理部を対応させる受信処理部テーブルと、
前記統計処理部の出力値と前記受信処理部テーブルを比較する比較部と、
前記比較部の結果に基づき、前記複数の受信処理部の中から前記統計処理部の出力値に対応する1つの受信処理部を選択する受信処理部セレクタと、
前記受信処理部セレクタの指示に基づき、前記受信処理部を切替える受信処理部切替器とを備え
前記統計処理部は、前記カウンタのカウント値から受信したデータの平均パケット長と平均到着時間間隔を算出し、通信回線上のトラヒック特性としてあらかじめ分類した複数のトラヒックパターンのいずれかに当てはめ、該トラヒックパターンの値を出力し、
前記受信処理部テーブルは、前記統計処理部の出力値であるトラヒックパターンに対して、前記各々異なる遅延時間後に前記強制同期処理部を起動する複数の受信処理部を、前記平均パケット長および前記到着時間間隔が長いトラヒックパターンほど前記遅延時間が短くなり、前記平均パケット長および前記到着時間間隔が短いトラヒックパターンほど前記遅延時間が長くなるように対応させることを特徴とするパケット処理装置。
A line corresponding unit for receiving data from the communication line;
A packet memory for storing data received by the line corresponding unit;
A protocol processing unit that performs protocol processing of data received by the line corresponding unit;
A forced synchronization processing unit for forcibly starting the protocol processing unit;
A plurality of reception processing units for starting the forced synchronization processing unit after different delay times after data transfer from the line corresponding unit to the packet memory is completed;
A traffic pattern acquisition unit that measures the data length of the data received by the packet processing device and the arrival time interval of the data;
A counter that holds the data length measured by the traffic pattern acquisition unit and the arrival time interval of the data;
A statistical processing unit that estimates traffic characteristics on the communication line from the count value of the counter;
A reception processing unit table that associates a plurality of reception processing units that activate the forced synchronization processing unit after the different delay times with respect to the output value of the statistical processing unit,
A comparison unit that compares the output value of the statistical processing unit with the reception processing unit table;
A reception processing unit selector that selects one reception processing unit corresponding to the output value of the statistical processing unit from the plurality of reception processing units based on the result of the comparison unit;
A reception processing unit switch for switching the reception processing unit based on an instruction of the reception processing unit selector ;
The statistical processing unit calculates an average packet length and an average arrival time interval of data received from the count value of the counter, and applies it to any one of a plurality of traffic patterns previously classified as traffic characteristics on a communication line. Output the pattern value,
The reception processing unit table includes a plurality of reception processing units that activate the forced synchronization processing unit after the different delay times with respect to a traffic pattern that is an output value of the statistical processing unit. A packet processing apparatus, wherein the delay time is shortened as a traffic pattern having a longer time interval, and the delay time is increased as a traffic pattern having a shorter average packet length and arrival time interval .
請求項に記載のパケット処理装置をコンピュータで実行させるためのプログラムであって、
前記プログラムは、コンピュータに、請求項に記載のプロトコル処理部、強制同期処理部、複数の受信処理部、トラヒックパターン取得部、カウンタ、統計処理部、比較部、受信処理部セレクタ、および、受信処理部切替器の処理を実行させることを特徴とするプログラム。
A program for causing a packet processing device according to claim 1 to be executed by a computer,
The program is stored in a computer according to claim 1 , a protocol processing unit, a forced synchronization processing unit, a plurality of reception processing units, a traffic pattern acquisition unit, a counter, a statistical processing unit, a comparison unit, a reception processing unit selector, and a reception A program for executing processing of a processing unit switching unit.
JP2006112839A 2006-04-17 2006-04-17 Packet processing apparatus and program Expired - Lifetime JP4349636B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006112839A JP4349636B2 (en) 2006-04-17 2006-04-17 Packet processing apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006112839A JP4349636B2 (en) 2006-04-17 2006-04-17 Packet processing apparatus and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2003372737A Division JP3934099B2 (en) 2003-10-31 2003-10-31 Packet processing apparatus and program

Publications (2)

Publication Number Publication Date
JP2006238477A JP2006238477A (en) 2006-09-07
JP4349636B2 true JP4349636B2 (en) 2009-10-21

Family

ID=37045551

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006112839A Expired - Lifetime JP4349636B2 (en) 2006-04-17 2006-04-17 Packet processing apparatus and program

Country Status (1)

Country Link
JP (1) JP4349636B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4780669B2 (en) * 2007-01-31 2011-09-28 Kddi株式会社 Traffic characteristic prediction device
JP4780668B2 (en) * 2007-01-31 2011-09-28 Kddi株式会社 Traffic analysis model construction method, apparatus, construction program, and storage medium thereof

Also Published As

Publication number Publication date
JP2006238477A (en) 2006-09-07

Similar Documents

Publication Publication Date Title
US11799764B2 (en) System and method for facilitating efficient packet injection into an output buffer in a network interface controller (NIC)
US7953915B2 (en) Interrupt dispatching method in multi-core environment and multi-core processor
US6836808B2 (en) Pipelined packet processing
KR101006260B1 (en) Apparatus and method for supporting memory management in an offload of network protocol processing
US20220261367A1 (en) Persistent kernel for graphics processing unit direct memory access network packet processing
CN107220200B (en) Dynamic priority based time-triggered Ethernet data management system and method
EP1750202A1 (en) Combining packets for a packetized bus
US10909655B2 (en) Direct memory access for graphics processing unit packet processing
JP2007079789A (en) Computer system and event processing method
US20070005742A1 (en) Efficient network communications via directed processor interrupts
WO2006019512A1 (en) Apparatus and method for supporting connection establishment in an offload of network protocol processing
US8356299B2 (en) Interrupt processing method and system
CN103428108B (en) data frame processing method and device
CN113518044B (en) EPA equipment
CN109962859A (en) A kind of method for dispatching message and equipment
US5533203A (en) Start of packet receive interrupt for ethernet controller
CN108011845A (en) A kind of method and apparatus for reducing time delay
JP5109748B2 (en) Virtual computer system, packet transmission control method, and network interface card used therefor
JP2000083053A (en) Program including system packet processor
JP4349636B2 (en) Packet processing apparatus and program
CN111756586B (en) Fair bandwidth allocation method based on priority queue in data center network, switch and readable storage medium
JP3934099B2 (en) Packet processing apparatus and program
CN117097679A (en) Aggregation method and device for network interruption and network communication equipment
JP5772132B2 (en) Data transfer apparatus, data transfer method, and information processing apparatus
WO2016134634A1 (en) Message receiving method, apparatus and device, computer storage medium and central processing unit

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081014

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081215

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081216

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090331

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090527

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20090608

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20090709

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090717

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

Free format text: PAYMENT UNTIL: 20120731

Year of fee payment: 3

R151 Written notification of patent or utility model registration

Ref document number: 4349636

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20090909

A072 Dismissal of procedure [no reply to invitation to correct request for examination]

Free format text: JAPANESE INTERMEDIATE CODE: A072

Effective date: 20100119

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

Free format text: PAYMENT UNTIL: 20130731

Year of fee payment: 4

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

EXPY Cancellation because of completion of term