JP5423516B2 - Communication control apparatus, image forming apparatus, and program - Google Patents
Communication control apparatus, image forming apparatus, and program Download PDFInfo
- Publication number
- JP5423516B2 JP5423516B2 JP2010064691A JP2010064691A JP5423516B2 JP 5423516 B2 JP5423516 B2 JP 5423516B2 JP 2010064691 A JP2010064691 A JP 2010064691A JP 2010064691 A JP2010064691 A JP 2010064691A JP 5423516 B2 JP5423516 B2 JP 5423516B2
- Authority
- JP
- Japan
- Prior art keywords
- threshold
- unit
- threshold value
- packets
- sampling time
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Description
本発明は、通信制御装置、画像形成装置、及びプログラムに関する。 The present invention relates to a communication control apparatus, an image forming apparatus, and a program.
従来より、CPUがパケットの受信によるCPUへの割込回数が閾値を超えると判断した場合に、CPUが、予め決められた時間が経過するまで、受信パケットを廃棄するようにNIC(Network Interface Card)を制御するコンピュータシステムが知られている(例えば、特許文献1参照)。 Conventionally, when the CPU determines that the number of interruptions to the CPU due to reception of a packet exceeds a threshold value, the NIC (Network Interface Card) is configured so that the received packet is discarded until a predetermined time elapses. ) Is known (see, for example, Patent Document 1).
本発明の目的は、受信データ数に応じて、受信データを処理するCPUにかかる負荷を動的に調整することができる通信制御装置、画像形成装置、及びプログラムを提供することにある。 An object of the present invention is to provide a communication control device, an image forming apparatus, and a program capable of dynamically adjusting a load on a CPU that processes received data according to the number of received data.
上記目的を達成するため、請求項1の通信制御装置は、一定周期毎に受信データの個数を算出する算出手段と、前記受信データの個数が増加するほど前記受信データを廃棄するか否かの判断に使用される閾値が減少するテーブル情報を備え、前記算出手段による算出値及び前記テーブル情報に応じて、前記閾値を決定する決定手段とを備えることを特徴とする。
In order to achieve the above object, the communication control apparatus according to
請求項2の通信制御装置は、請求項1の通信制御装置において、前記一定周期の長さを変更する変更手段を備えることを特徴とする。 According to a second aspect of the present invention, there is provided the communication control device according to the first aspect, further comprising changing means for changing the length of the fixed period.
請求項3の通信制御装置は、請求項1又は2に記載の通信制御装置において、前記受信データを廃棄する廃棄手段を更に備え、前記算出手段及び前記決定手段は、前記受信データの転送経路上において前記廃棄手段の上流側に設けられていることを特徴とする。
The communication control device according to
請求項4の通信制御装置は、請求項1乃至3のいずれか1項に記載の通信制御装置において、前記テーブル情報を複数備え、少なくとも一つのテーブル情報は、前記算出値の増加量に対する閾値の減少量の割合が一定であり、他の一つのテーブル情報は、前記算出値の増加量に対する閾値の減少量の割合が変動することを特徴とする。
The communication control device according to claim 4 is the communication control device according to any one of
請求項5の通信制御装置は、請求項4に記載の通信制御装置において、前記決定手段は、前回の一定周期で使用された閾値に基づいて、前記複数のテーブル情報の中から使用すべきテーブル情報を選択し、前回の一定周期で算出された算出値及び当該選択されたテーブル情報に応じて、閾値を決定することを特徴とする。
The communication control device according to
請求項6の画像形成装置は、前記請求項1乃至5のいずれか1項に記載の通信制御装置を備えることを特徴とする。 An image forming apparatus according to a sixth aspect includes the communication control apparatus according to any one of the first to fifth aspects.
請求項7のプログラムは、通信制御装置を、一定周期毎に受信データの個数を算出する算出手段、及び前記受信データの個数が増加するほど前記受信データを廃棄するか否かの判断に使用される閾値が減少するテーブル情報を備え、前記算出手段による算出値及び前記テーブル情報に応じて、前記閾値を決定する決定手段として機能させることを特徴とする。
The program according to
請求項1の発明によれば、受信データ数に応じて、受信データを処理するCPUにかかる負荷を動的に調整することができる。 According to the first aspect of the present invention, it is possible to dynamically adjust the load on the CPU that processes the received data according to the number of received data.
請求項2の発明によれば、一定周期の長さを変更することで、閾値を調整することができ、受信データを処理するCPUにかかる負荷を動的に調整することができる。 According to the second aspect of the present invention, the threshold value can be adjusted by changing the length of the fixed period, and the load on the CPU that processes the received data can be dynamically adjusted.
請求項3の発明によれば、受信データの廃棄期間中も、受信データ数に応じて、受信データを処理するCPUにかかる負荷を動的に調整することができる。 According to the third aspect of the present invention, it is possible to dynamically adjust the load on the CPU that processes the received data according to the number of received data even during the discard period of the received data.
請求項4の発明によれば、多様な閾値の変更パターンを提供することができる。 According to the invention of claim 4, various threshold value change patterns can be provided.
請求項5の発明によれば、前回の一定周期で使用された閾値及び前回の一定周期で算出された算出値を考慮して閾値を決定することができる。
According to the invention of
請求項6の発明によれば、受信データ数に応じて、受信データを処理するCPUにかかる負荷を動的に調整することができる。
According to the invention of
請求項7の発明によれば、受信データ数に応じて、受信データを処理するCPUにかかる負荷を動的に調整することができる。 According to the seventh aspect of the present invention, it is possible to dynamically adjust the load on the CPU that processes the received data according to the number of received data.
以下、本発明の実施の形態について、図面を参照して説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
図1は、本実施の形態に係る画像形成装置の構成を示すブロック図である。 FIG. 1 is a block diagram showing a configuration of an image forming apparatus according to the present embodiment.
図1の画像形成装置1は、例えば、複合機(MFP(Multi Function Peripheral)である。画像形成装置1は、装置全体の動作を制御するCPU2、各種のプログラムやデータを記憶するメインメモリ3、バス5及びバス6をブリッジするバスブリッジ4、ネットワーク10を介して他の装置(不図示)と通信する通信制御部7、画像を記録媒体上に形成する画像形成部8、及びユーザインタフェース(UI)9を備えている。
1 is, for example, an MFP (Multi Function Peripheral). The
バス5及びバス6は、PCI(Peripheral Component Interconnect)バス又はPCI Expressバスで構成されている。CPU2は、バスブリッジ4及びバス5を介してメインメモリ3及びUI9と通信し、バスブリッジ4及びバス6を介して通信制御部7及び画像形成部8と通信する。通信制御部7は、通信制御装置としてのネットワークインタフェースカードである。画像形成部8は、ドラム、転写ベルト、現像器及び定着器等(不図示)を備えている。UI9は、例えば、タッチパネル式の表示装置であり、出力部数や出力方法等の設定や表示に使用される。また、UI9は、後述するサンプリングタイマのサンプリング間隔の設定に使用される。
The
図2は、図1の通信制御部7の構成を示すブロック図である。図2では、通信制御部7のパケットを受信する構成を示す。
FIG. 2 is a block diagram showing a configuration of the
通信制御部7は、受信部11、フィルタ部12(廃棄手段)、セレクタ13及びDMA(Direct Memory Access)部14を備えている。受信部11は、ネットワーク10からパケットを受信する。尚、受信部11が受信するデータは、パケット形式のデータに限定されるものではない。フィルタ部12は、受信部11から出力された特定の受信パケットを廃棄する。廃棄される特定の受信パケットは、例えば、ブロードキャストパケット(自分宛のARP(Address Resolution Protocol)パケットを除く)である。尚、特定の受信パケットは、フィルタ部12で受信した全パケットでもよい。また、以下の説明では、受信パケットは、ブロードキャストパケット(自分宛のARP(Address Resolution Protocol)パケットを除く)を指すものとする。セレクタ13は、受信部11からの選択信号に応じて、セレクタ13と受信部11との間の第1経路、又はセレクタ13とフィルタ部12との間の第2経路のいずれか一方を選択する。DMA部14は、受信パケットをメインメモリ3に出力すると共に、受信パケットのメインメモリ3への出力が終了したときに割込信号をCPU2へ出力する。CPU2は割込信号を受信し、メインメモリ3に格納された受信パケットに所定の処理(例えば、受信パケットを展開し、画像データやテキストデータを取り出す処理)を実行する。また、通信制御部7は、受信パケットの転送経路(即ち、受信パケットがネットワーク10からメインメモリ3へ転送される経路)上においてCPU2の上流側に設けられている。受信部11は、受信パケットの転送経路上においてフィルタ部12の上流側に設けられている。
The
受信部11がネットワーク10からパケットを受信すると、受信部11が、パケットの受信数が閾値以上であるか否かを判別する。パケットの受信数が閾値以上である場合には、受信部11は、第2経路を選択する選択信号をセレクタ13に出力する。これにより、受信パケットはフィルタ部12で廃棄され、DMA部14に出力されない。一方、パケットの受信数が閾値を超えない場合には、受信部11は、第1経路を選択する選択信号をセレクタ13に出力する。これにより、受信パケットは、セレクタ13を介してDMA部14に出力される。
When the
図3は、図2の受信部11の構成を示すブロック図である。
FIG. 3 is a block diagram illustrating a configuration of the
受信部11は、水晶発振器21、レジスタ22、パルス発生回路23、パケットカウンタ24、サンプリングタイマ25(算出手段、変更手段)、ルックアップテーブル(LUT)入力制御部26(決定手段)、閾値LUT27、保持部28、FIFO(First-In First-Out)部29及び比較部30を備えている。水晶発振器21は、クロックをパルス発生回路23に出力する。レジスタ22は、単位時間の設定情報をパルス発生回路23に出力する。単位時間は、あるパルスの出力から次のパルスの出力までの期間である。単位時間の設定情報は、単位時間あたりのクロック数を示す。また、単位時間の設定情報は、画像形成装置1の初期化時に、CPU2によりレジスタ22に設定される。
The
パルス発生回路23は、水晶発振器21から出力されるクロックとレジスタ22から出力される単位時間の設定情報とに基づいて、パルスを生成し、パケットカウンタ24に出力する。パケットカウンタ24は、パルス発生回路23から出力されるパルス及びネットワーク10からパケットを受信し、単位時間あたりのパケット数をカウントする。パケットカウンタ24は、単位時間あたりのパケット数の値をサンプリングタイマ25に出力する。
The
サンプリングタイマ25は、パケットカウンタ24から出力された、単位時間あたりのパケット数の値に、CPU2から取得するサンプリング間隔を乗算することで、サンプリング時間の合計パケット数を算出する。サンプリングタイマ25は、サンプリング時間の合計パケット数をLUT入力制御部26及びFIFO部29に出力する。
The
サンプリング時間は、単位時間*サンプリング間隔である。サンプリング時間の最小値は、単位時間である(サンプリング間隔=1)。サンプリングタイマ25は、単位時間あたりのパケット数の値を受信する度に単位時間の経過が分かる。サンプリング間隔は、画像形成装置1の初期化時に、CPU2から取得する。また、CPU2に設定されているサンプリング間隔の値は、UI9からの指示により変更可能である。つまり、サンプリングタイマ25は、UI9からの指示によりサンプリング時間を変更する。
The sampling time is unit time * sampling interval. The minimum value of the sampling time is a unit time (sampling interval = 1). The
FIFO部29は、サンプリング時間の合計パケット数を保持し、次のサンプリング時間の開始タイミングで比較部30に出力する。
The
LUT入力制御部26は、閾値LUT27及び保持部28を備えている。LUT入力制御部26は、サンプリング時間の合計パケット数を入力し、閾値LUT27に基づいて閾値を決定する。保持部28は、サンプリング時間の合計パケット数及び決定されて閾値を保持し、保持された閾値を次のサンプリング時間の開始タイミングで出力する。
The LUT
具体的には、LUT入力制御部26は、閾値を決定する2つ方法を有する。第1の方法では、LUT入力制御部26は、前回のサンプリング時間の合計パケット数及び閾値LUT27に基づいて閾値を決定する。第2の方法では、LUT入力制御部26は、前回のサンプリング時間の合計パケット数、前回のサンプリング時間の閾値及び閾値LUT27に基づいて閾値を決定する。第1の方法及び第2の方法のいずれを選択するかは、UI9で設定する。尚、閾値は、比較部30が合計パケット数と比較するために使用する値である。換言すると、閾値は、フィルタ部12の動作の有効又は無効を決定するための値、又は受信パケットを廃棄するか否かの判断に使用される値である。
Specifically, the LUT
比較部30は、FIFO部29から受信するサンプリング時間の合計パケット数をLUT入力制御部26(保持部28)から受信する閾値と比較する。比較の結果、サンプリング時間の合計パケット数が閾値以上である場合には、比較部30は、フィルタ部12の動作を有効にするトリガ信号「1」をフィルタ部12に出力し、第2経路を選択する選択信号をセレクタ13に出力する。これにより、受信パケットはフィルタ部12で廃棄される。一方、サンプリング時間の合計パケット数が閾値を超えない場合には、比較部30は、フィルタ部12の動作を無効にするトリガ信号「0」をフィルタ部12に出力し、第1経路を選択する選択信号をセレクタ13に出力する。これにより、受信パケットはフィルタ部12で廃棄されない。
The
図4(A)は、LUT入力制御部26が前回のサンプリング時間の合計パケット数に基づいて閾値を決定する際に使用する閾値LUTの例を示す図である。図4(B),(C)は、LUT入力制御部26が前回のサンプリング時間の合計パケット数及び前回のサンプリング時間の閾値に基づいて閾値を決定する際に使用する2つの閾値LUTの例を示す図である。
FIG. 4A is a diagram illustrating an example of the threshold LUT used when the LUT
図4(A)〜(C)に示すように、閾値LUT27は、基本的に、サンプリング時間の合計パケット数が多いほど、閾値を下げる。また、閾値の上限値及び下限値並びに閾値LUT上の直線の傾きは、CPU2の処理能力によって変わる。
As shown in FIGS. 4A to 4C, the
前回のサンプリング時間の合計パケット数に基づいて閾値が決定される場合は、LUT入力制御部26は、各サンプリング時間毎に、前回のサンプリング時間の合計パケット数及び図4(A)の閾値LUTに基づいて閾値を決定する。
When the threshold value is determined based on the total number of packets in the previous sampling time, the LUT
一方、前回のサンプリング時間の合計パケット数及び前回のサンプリング時間の閾値に基づいて閾値が決定される場合は、LUT入力制御部26は、各サンプリング時間毎に、前回のサンプリング時間の合計パケット数と前回のサンプリング時間の閾値との差分の絶対値に基づいて、使用すべき閾値LUTを図4(B)、(C)の閾値LUTの中から選択する。又は、LUT入力制御部26は、各サンプリング時間毎に、前回のサンプリング時間の閾値に基づいて、使用すべき閾値LUTを図4(B)、(C)の閾値LUTの中から選択する。その後、LUT入力制御部26は、各サンプリング時間毎に、前回のサンプリング時間の合計パケット数及び選択された閾値LUTに基づいて閾値を決定する。
On the other hand, when the threshold is determined based on the total number of packets of the previous sampling time and the threshold of the previous sampling time, the LUT
例えば、図4(B)の閾値LUTは、前回のサンプリング時間の合計パケット数と前回のサンプリング時間の閾値との差分の絶対値が第1所定値(例えば1000)以上である場合に使用されるものとし、図4(C)の閾値LUTは、前回のサンプリング時間の合計パケット数と前回のサンプリング時間の閾値との差分の絶対値が第1所定値(例えば1000)未満である場合に使用されるものとする。 For example, the threshold value LUT in FIG. 4B is used when the absolute value of the difference between the total number of packets of the previous sampling time and the threshold value of the previous sampling time is greater than or equal to a first predetermined value (for example, 1000). The threshold value LUT in FIG. 4C is used when the absolute value of the difference between the total number of packets of the previous sampling time and the threshold value of the previous sampling time is less than a first predetermined value (for example, 1000). Shall be.
LUT入力制御部26は、前回のサンプリング時間の合計パケット数と前回のサンプリング時間の閾値との差分の絶対値が第1所定値(例えば1000)以上であれば、図4(B)の閾値LUTを選択し、各サンプリング時間毎に、前回のサンプリング時間の合計パケット数及び図4(B)の閾値LUTに基づいて閾値を決定する。また、閾値LUT部27は、前回のサンプリング時間の合計パケット数と前回のサンプリング時間の閾値との差分の絶対値が第1所定値(例えば1000)未満であれば、図4(C)の閾値LUTを選択し、各サンプリング時間毎に、図4(C)の閾値LUT及び前回のサンプリング時間の合計パケット数に基づいて閾値を決定する。尚、上記第1所定値は、UI9により適宜変更可能である。
If the absolute value of the difference between the total number of packets of the previous sampling time and the threshold of the previous sampling time is equal to or greater than a first predetermined value (for example, 1000), the LUT
また、例えば、図4(B)の閾値LUTは、前回のサンプリング時間の閾値が第2所定値(例えば2000)以上である場合に使用されるものとし、図4(C)の閾値LUTは、前回のサンプリング時間の閾値が第2所定値(例えば2000)未満である場合に使用されるものとする。 Further, for example, the threshold value LUT in FIG. 4B is used when the previous sampling time threshold value is a second predetermined value (for example, 2000) or more, and the threshold value LUT in FIG. It is assumed that the previous sampling time threshold is used when it is less than a second predetermined value (for example, 2000).
LUT入力制御部26は、前回のサンプリング時間の閾値が第2所定値(例えば2000)以上であれば、図4(B)の閾値LUTを選択し、各サンプリング時間毎に、前回のサンプリング時間の合計パケット数及び図4(B)の閾値LUTに基づいて閾値を決定する。また、閾値LUT部27は、前回のサンプリング時間の閾値が第2所定値(例えば2000)未満であれば、図4(C)の閾値LUTを選択し、各サンプリング時間毎に、図4(C)の閾値LUT及び前回のサンプリング時間の合計パケット数に基づいて閾値を決定する。尚、上記第2所定値は、UI9により適宜変更可能である。
The LUT
閾値LUTの個数は、LUT入力制御部26の記憶容量に応じて決定される。LUT入力制御部26は1つの閾値LUTを備えてもよいし、複数の閾値LUTを備えてもよい。閾値LUTの個数が多いほど、閾値の変更パターンは増加する。
The number of threshold LUTs is determined according to the storage capacity of the LUT
図4(A)の閾値LUTでは、サンプリング時間の合計パケット数の任意の地点Aからサンプリング時間の合計パケット数が100増加する(地点B)と、閾値が100減少するように、サンプリング時間の合計パケット数の増加量に対する閾値の減少量の割合は、固定(一定)である。また、図4(B)、(C)の閾値LUTでも同様に、サンプリング時間の合計パケット数の増加量に対する閾値の減少量の割合は、固定(一定)である。図4(A)〜(C)の閾値LUTは、例えば、図4(D)、(E)のような閾値LUTでもよい。図4(D)、(E)の場合、サンプリング時間の合計パケット数の増加量に対する閾値の減少量の割合が変動する。図4(D)では、第1区間xにおけるサンプリング時間の合計パケット数>第2区間yにおけるサンプリング時間の合計パケット数の関係が成立する場合に、第1区間xにおけるサンプリング時間の合計パケット数の増加量に対する閾値の減少量の割合は、第2区間yにおけるサンプリング時間の合計パケット数の増加量に対する閾値の減少量の割合よりも大きい。一方、図4(D)では、第1区間xにおけるサンプリング時間の合計パケット数>第2区間yにおけるサンプリング時間の合計パケット数の関係が成立する場合に、第1区間xにおけるサンプリング時間の合計パケット数の増加量に対する閾値の減少量の割合は、第2区間yにおけるサンプリング時間の合計パケット数の増加量に対する閾値の減少量の割合よりも小さい。 In the threshold value LUT in FIG. 4A, the total sampling time is set so that the threshold value decreases by 100 when the total sampling time packet number increases by 100 from an arbitrary point A of the total sampling time packet number (point B). The ratio of the threshold decrease amount to the packet increase amount is fixed (constant). Similarly, in the threshold value LUT shown in FIGS. 4B and 4C, the ratio of the decrease amount of the threshold value to the increase amount of the total number of packets during the sampling time is fixed (constant). The threshold value LUTs in FIGS. 4A to 4C may be threshold value LUTs as shown in FIGS. 4D and 4E, for example. In the case of FIGS. 4D and 4E, the ratio of the threshold decrease amount to the increase amount of the total number of packets in the sampling time varies. In FIG. 4D, when the relationship of the total number of packets of the sampling time in the first section x> the total number of packets of the sampling time in the second section y is satisfied, the total number of packets of the sampling time in the first section x is The ratio of the threshold decrease amount to the increase amount is larger than the ratio of the threshold decrease amount to the increase amount of the total number of packets in the sampling time in the second interval y. On the other hand, in FIG. 4D, when the relationship of the total number of packets of the sampling time in the first section x> the total number of packets of the sampling time in the second section y is satisfied, the total packets of the sampling time in the first section x The ratio of the threshold decrease amount to the number increase amount is smaller than the ratio of the threshold decrease amount to the increase amount of the total number of packets in the sampling period in the second interval y.
LUT入力制御部26が図4(A)〜(C)の閾値LUTに加えて、図4(D)、(E)の少なくとも一方を備える場合、多様な閾値の変更パターンが提供される。つまり、CPU2にかかる負荷を調整する複数の方法が提供される。
When the LUT
図5は、サンプリング時間と閾値との関係を示す図である。 FIG. 5 is a diagram illustrating the relationship between the sampling time and the threshold value.
閾値が前回のサンプリング時間の合計パケット数に基づいて決定される場合は、具体的には、閾値はLUT入力制御部26によって下記のように決定される。
When the threshold is determined based on the total number of packets of the previous sampling time, specifically, the threshold is determined by the LUT
サンプリング時間が「1」の場合、時間n−1の閾値Aは、時間n−2の合計パケット数α及び図4(A)の閾値LUTに基づいて決定される。時間nの閾値Bは、時間n−1の合計パケット数β及び図4(A)の閾値LUTに基づいて決定される。一方、サンプリング時間が「2」の場合、時間nの閾値Cは、時間n−2の合計パケット数α及び図4(A)の閾値LUTに基づいて決定される。 When the sampling time is “1”, the threshold value A at time n−1 is determined based on the total number of packets α at time n−2 and the threshold value LUT in FIG. The threshold value B at time n is determined based on the total number of packets β at time n−1 and the threshold value LUT in FIG. On the other hand, when the sampling time is “2”, the threshold value C at time n is determined based on the total number of packets α at time n−2 and the threshold value LUT in FIG.
閾値が、前回のサンプリング時間の合計パケット数及び前回のサンプリング時間の閾値に基づいて決定される場合は、具体的には、閾値はLUT入力制御部26によって下記のように決定される。
When the threshold is determined based on the total number of packets of the previous sampling time and the threshold of the previous sampling time, specifically, the threshold is determined by the LUT
サンプリング時間が「1」の場合、時間n−1の閾値Aは、時間n−2の合計パケット数αと閾値Zとの差分の絶対値、又は時間n−2の合計パケット数αに応じて、図4(B)又は図4(C)のいずれかの閾値LUTが選択された後に、選択された閾値LUTと時間n−2の合計パケット数αに基づいて決定される。時間nの閾値Bは、時間n−1の合計パケット数βと閾値Aとの差分の絶対値、又は時間n−1の合計パケット数βに応じて、図4(B)又は図4(C)のいずれかの閾値LUTが選択された後に、選択された閾値LUTと時間n−1の合計パケット数βに基づいて決定される。一方、サンプリング時間が「1」の場合、時間n−1の閾値Cは、時間n−2の合計パケット数αと閾値Zとの差分の絶対値、又は時間n−2の合計パケット数αに応じて、図4(B)又は図4(C)のいずれかの閾値LUTが選択された後に、選択された閾値LUTと時間n−2の合計パケット数αに基づいて決定される。 When the sampling time is “1”, the threshold value A at time n−1 depends on the absolute value of the difference between the total number of packets α and the threshold value Z at time n−2 or the total number of packets α at time n−2. After either threshold value LUT shown in FIG. 4B or 4C is selected, the threshold value LUT is determined based on the selected threshold value LUT and the total number of packets α at time n−2. The threshold value B at time n depends on the absolute value of the difference between the total number of packets β at time n−1 and the threshold value A, or the total number of packets β at time n−1, as shown in FIG. ) Is selected based on the selected threshold value LUT and the total number of packets β at time n−1. On the other hand, when the sampling time is “1”, the threshold value C at time n−1 is the absolute value of the difference between the total number of packets α and the threshold value Z at time n−2 or the total number of packets α at time n−2. Accordingly, after the threshold LUT of either FIG. 4B or FIG. 4C is selected, it is determined based on the selected threshold LUT and the total number of packets α at time n−2.
図5において、サンプリング時間が「1」の場合、閾値Zは、サンプリング時間が2つ進むことによって、閾値Bになる。これに対して、サンプリング時間が「2」の場合、閾値Zは、サンプリング時間が2つ進むことによって、閾値Cになる。このように、サンプリング時間の長さを変えるによって、閾値は調整可能である。 In FIG. 5, when the sampling time is “1”, the threshold value Z becomes the threshold value B by two sampling times. On the other hand, when the sampling time is “2”, the threshold value Z becomes the threshold value C by two sampling times. Thus, the threshold value can be adjusted by changing the length of the sampling time.
また、サンプリング時間が「1」の場合、時間nの合計パケット数γは時間nの閾値B以上なので、受信パケットはフィルタ部12で廃棄される。一方、サンプリング時間が「2」の場合、時間nの合計パケット数γは時間nの閾値C未満なので、受信パケットはフィルタ部12で廃棄されない。このように、サンプリング時間の長さを変えることによって、受信パケットの廃棄量は調整可能であり、CPU2にかかる負荷も調整される。
When the sampling time is “1”, the total number of packets γ at time n is equal to or greater than the threshold value B at time n, so the received packet is discarded by the
図6(A)は、サンプリング時間が長い場合の合計パケット数及び閾値の関係を示す図であり、図6(B)は、サンプリング時間が短い場合の合計パケット数及び閾値の関係を示す図である。 FIG. 6A is a diagram illustrating the relationship between the total number of packets and the threshold when the sampling time is long, and FIG. 6B is a diagram illustrating the relationship between the total number of packets and the threshold when the sampling time is short. is there.
図6(A)、(B)では、合計パケット数を太線で示し、閾値を一点鎖線で示し、サンプリング時間を点線で示している。また、比較部30の更新タイミングを黒点で示す。FIFO部29がサンプリング時間の合計パケット数を、1サンプリング時間分遅らせて、比較部30に出力するので、比較部30の更新タイミングは、合計パケット数のグラフから1サンプリング時間分遅くなっている。
6A and 6B, the total number of packets is indicated by a bold line, the threshold value is indicated by a one-dot chain line, and the sampling time is indicated by a dotted line. Further, the update timing of the
本実施の形態では、LUT入力制御部26が、図4(A)〜(C)のいずれかの閾値LUTとサンプリング時間の合計パケット数に基づいて、各サンプリング時間毎に、閾値を変更するので、合計パケット数が図6(A)、(B)の太線のように変化する場合、閾値は、図6(A)、(B)に示す一点鎖線のように変化する。即ち、合計パケット数が増加する場合、LUT入力制御部26が閾値を下げることで、受信パケットは廃棄され、CPU2にかかる負荷を軽減する。逆に、合計パケット数が減少する場合、LUT入力制御部26が閾値を上げることで、CPU2の負荷が重くない範囲でCPU2がパケット処理できるようにする。従って、受信パケット数に応じて、受信パケットを処理するCPU2にかかる負荷が動的に調整される。
In the present embodiment, the LUT
図7は、LUT入力制御部26で実行される処理を示すフローチャートである。
FIG. 7 is a flowchart showing processing executed by the LUT
まず、LUT入力制御部26は、閾値を決定する設定が前回のサンプリング時間の閾値を使用する設定であるか否かを判別する(ステップS1)。閾値を決定する設定は、LUT入力制御部26に含まれており、UI9によって変更可能である。
First, the LUT
ステップS1でYESの場合には、LUT入力制御部26は、前回のサンプリング時間の合計パケット数及び前回のサンプリング時間の閾値に応じて、使用すべき閾値LUTを選択する(ステップS2)。上述したように、例えば、前回のサンプリング時間の合計パケット数と前回のサンプリング時間の閾値との差分の絶対値が第1所定値(例えば1000)以上であれば、LUT入力制御部26は、図4(B)の閾値LUTを選択し、前回のサンプリング時間の合計パケット数と前回のサンプリング時間の閾値との差分の絶対値が第1所定値(例えば1000)未満であれば、LUT入力制御部26は、図4(C)の閾値LUTを選択する。また、前回のサンプリング時間の閾値が第2所定値(例えば2000)以上であれば、LUT入力制御部26は、図4(B)の閾値LUTを選択し、前回のサンプリング時間の閾値が第2所定値(例えば2000)未満であれば、LUT入力制御部26は、図4(C)の閾値LUTを選択する。
If YES in step S1, the LUT
LUT入力制御部26は、選択された閾値LUT及び前回のサンプリング時間の合計パケット数に基づいて閾値を決定する(ステップS3)。LUT入力制御部26内の保持部28が、次のサンプリング時間まで閾値及び今回のサンプリング時間の合計パケット数を保持し、次のサンプリング時間の開始タイミングで閾値を比較部30に出力する(ステップS4)。その後、ステップS1に戻る。
The LUT
ステップS1でNOの場合には、LUT入力制御部26は、予め決められた閾値LUT(例えば、図4(A)の閾値LUT)及び前回のサンプリング時間の合計パケット数に基づいて閾値を決定し(ステップS5)、ステップS4に進む。
In the case of NO in step S1, the LUT
図8は、比較部30で実行される処理を示すフローチャートである。
FIG. 8 is a flowchart showing processing executed by the
比較部30は、FIFO部29から合計パケット数を、LUT入力制御部26内の保持部28から閾値を取得し(ステップS11)、合計パケット数が閾値以上であるか否かを判別する(ステップS12)。
The
ステップS12でYESの場合には、比較部30は、フィルタ部12の動作を有効にするトリガ信号「1」をフィルタ部12に出力し、第2経路を選択する選択信号をセレクタ13に出力し(ステップS13)、本処理を終了する。一方、ステップS12でNOの場合には、比較部30は、フィルタ部12の動作を無効にするトリガ信号「0」をフィルタ部12に出力し、第1経路を選択する選択信号をセレクタ13に出力し(ステップS14)、本処理を終了する。フィルタ部12がトリガ信号「1」を受信したときのみフィルタ部12の動作が有効になる場合は、ステップS14で比較部30は、フィルタ部12に何も出力しなくてもよい。
In the case of YES in step S12, the
以上説明したように、本実施の形態によれば、通信制御部7が、一定周期(サンプリング時間)毎に合計パケット数を算出するサンプリングタイマ25と、受信パケットの個数が増加するほど受信パケットを廃棄するか否かの判断に使用される閾値が減少するテーブル情報を備え、サンプリングタイマ25による算出値及びテーブル情報に応じて、閾値を決定するLUT入力制御部26とを備えている。よって、受信パケットの個数に応じて、受信パケットを廃棄するか否かの判断に使用される閾値が変更され、受信データを処理するCPU2にかかる負荷が動的に調整される。また、従来、受信パケットの個数に相当する割込信号のカウント処理や受信パケットの廃棄判断処理に使用されていたCPUのリソースは、他の処理に割り当てることが可能である。さらに、従来、突発的に又は局所的にパケット数が増加し、受信パケット数が閾値以上である場合、予め決められた期間、フィルタが有効になるため、必要以上に受信パケットが廃棄されることがあった。これに対して、本実施の形態では、サンプリング時間毎に閾値が決定される、即ち、サンプリング時間毎に閾値が変動可能なので、必要以上に受信パケットが廃棄されることが回避される。
As described above, according to the present embodiment, the
また、サンプリングタイマ25は、UI9から指示によって、サンプリング時間の長さを変更する。サンプリング時間の長さを変更することによって閾値は調整され、受信データを処理するCPU2にかかる負荷も動的に調整される。
The
通信制御装置(即ち通信制御部7)の機能を実現するためのソフトウェアのプログラムが記録されている記録媒体を、通信制御装置に供給し、受信部111が記憶媒体に格納されたプログラムを読み出し実行することによっても、上記実施の形態と同様の効果を奏する。プログラムを供給するための記憶媒体としては、例えば、CD−ROM、DVD、又はSDカードなどがある。 A recording medium in which a software program for realizing the function of the communication control device (that is, the communication control unit 7) is recorded is supplied to the communication control device, and the reception unit 111 reads and executes the program stored in the storage medium. By doing so, the same effects as those of the above embodiment can be obtained. Examples of the storage medium for supplying the program include a CD-ROM, a DVD, or an SD card.
また、通信制御装置が、通信制御装置の機能を実現するためのソフトウェアのプログラムを実行することによっても、上記実施の形態と同様の効果を奏する。 Further, the same effect as that of the above-described embodiment can also be obtained when the communication control device executes a software program for realizing the function of the communication control device.
1 複合機
2 CPU
3 メインメモリ
7 通信制御部
11 受信部
12 フィルタ部
13 セレクタ
14 DMA(Direct Memory Access)部
21 水晶発振器
22 レジスタ
23 パルス発生回路
24 パケットカウンタ
25 サンプリングタイマ
26 LUT入力制御部
27 閾値LUT
28 保持部
29 FIFO部
30 比較部
1
3
28
Claims (7)
前記受信データの個数が増加するほど前記受信データを廃棄するか否かの判断に使用される閾値が減少するテーブル情報を備え、前記算出手段による算出値及び前記テーブル情報に応じて、前記閾値を決定する決定手段と
を備えることを特徴とする通信制御装置。 A calculating means for calculating the number of received data for each fixed period;
Table information in which a threshold used for determining whether to discard the received data decreases as the number of the received data increases, and the threshold is set according to the calculated value by the calculating means and the table information. A communication control apparatus comprising: a determining unit that determines.
前記算出手段及び前記決定手段は、前記受信データの転送経路上において前記廃棄手段の上流側に設けられていることを特徴とする請求項1又は2に記載の通信制御装置。 A discarding unit for discarding the received data;
The communication control apparatus according to claim 1, wherein the calculation unit and the determination unit are provided on the upstream side of the discard unit on the transfer path of the received data.
少なくとも一つのテーブル情報は、前記算出値の増加量に対する閾値の減少量の割合が一定であり、他の一つのテーブル情報は、前記算出値の増加量に対する閾値の減少量の割合が変動することを特徴とする請求項1乃至3のいずれか1項に記載の通信制御装置。 A plurality of the table information;
In at least one table information, the ratio of the threshold decrease amount to the calculated amount increase is constant, and in the other one table information, the ratio of the threshold decrease amount to the calculated value increase varies. The communication control device according to any one of claims 1 to 3.
一定周期毎に受信データの個数を算出する算出手段、及び
前記受信データの個数が増加するほど前記受信データを廃棄するか否かの判断に使用される閾値が減少するテーブル情報を備え、前記算出手段による算出値及び前記テーブル情報に応じて、前記閾値を決定する決定手段と
して機能させることを特徴とするプログラム。 Communication control device
Calculation means for calculating the number of received data for each fixed period, and table information in which a threshold used for determining whether or not to discard the received data decreases as the number of the received data increases; A program that functions as a determining unit that determines the threshold value according to a calculated value by the unit and the table information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010064691A JP5423516B2 (en) | 2010-03-19 | 2010-03-19 | Communication control apparatus, image forming apparatus, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010064691A JP5423516B2 (en) | 2010-03-19 | 2010-03-19 | Communication control apparatus, image forming apparatus, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011198096A JP2011198096A (en) | 2011-10-06 |
JP5423516B2 true JP5423516B2 (en) | 2014-02-19 |
Family
ID=44876196
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010064691A Expired - Fee Related JP5423516B2 (en) | 2010-03-19 | 2010-03-19 | Communication control apparatus, image forming apparatus, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5423516B2 (en) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6453360B1 (en) * | 1999-03-01 | 2002-09-17 | Sun Microsystems, Inc. | High performance network interface |
JP3680015B2 (en) * | 2001-08-29 | 2005-08-10 | 三菱電機株式会社 | Information processing device |
JP2004104192A (en) * | 2002-09-05 | 2004-04-02 | Toyo Commun Equip Co Ltd | Buffer overflow detection method and circuit |
JP2005347894A (en) * | 2004-05-31 | 2005-12-15 | Toshiba Corp | Computer system and reception interruption processing method thereof |
-
2010
- 2010-03-19 JP JP2010064691A patent/JP5423516B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2011198096A (en) | 2011-10-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4998699B2 (en) | Semiconductor device and communication control method | |
Emmerich et al. | Optimizing latency and CPU load in packet processing systems | |
US7852777B2 (en) | Network hardware device | |
JP5932242B2 (en) | Information processing apparatus, communication method, and program | |
JP5423516B2 (en) | Communication control apparatus, image forming apparatus, and program | |
US8401136B2 (en) | Semiconductor integrated circuit and communication system | |
JP6378966B2 (en) | Asynchronous serial data acquisition device and asynchronous serial data acquisition method | |
JP2004295701A (en) | Serial communication device | |
JP2008010905A (en) | Priority control method and apparatus at packet transmission | |
US8797575B2 (en) | Dynamic control of packet filtering period | |
JP2011199636A (en) | Communication control apparatus, image forming apparatus, and program | |
JP3957696B2 (en) | IP network terminal device | |
WO2017068663A1 (en) | Communication device, communication method, and communication program | |
JP4328223B2 (en) | Data transmitting apparatus and data receiving apparatus | |
JP2008217821A (en) | Computer for dynamically determining interrupt delay | |
JP2005267294A (en) | Network interrupt control method, information processing apparatus and image forming apparatus | |
JP6037979B2 (en) | Receiving apparatus and noise removing method | |
JP4898527B2 (en) | RESOURCE USE MANAGEMENT DEVICE, RESOURCE USE MANAGEMENT SYSTEM, AND RESOURCE USE MANAGEMENT DEVICE CONTROL METHOD | |
JP2007079836A (en) | Data communication device and data communication method | |
TW550908B (en) | System and method for flexibly interrupting data processing | |
JP5720212B2 (en) | Semiconductor device, image processing device | |
JP5263970B2 (en) | Packet receiving apparatus, packet buffer congestion state recovery method, and program | |
JP2012191304A (en) | Synchronous signal processing device and synchronous signal processing method | |
JP5413367B2 (en) | Semiconductor device and communication method | |
JP4776947B2 (en) | Data processing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130220 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20131024 |
|
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: 20131029 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20131111 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 5423516 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |