[go: up one dir, main page]

JP2010226275A - Communication equipment and communication method - Google Patents

Communication equipment and communication method Download PDF

Info

Publication number
JP2010226275A
JP2010226275A JP2009069400A JP2009069400A JP2010226275A JP 2010226275 A JP2010226275 A JP 2010226275A JP 2009069400 A JP2009069400 A JP 2009069400A JP 2009069400 A JP2009069400 A JP 2009069400A JP 2010226275 A JP2010226275 A JP 2010226275A
Authority
JP
Japan
Prior art keywords
work
packet
output queue
subwork
sub
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.)
Withdrawn
Application number
JP2009069400A
Other languages
Japanese (ja)
Inventor
Keisuke Tsubota
圭介 坪田
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2009069400A priority Critical patent/JP2010226275A/en
Publication of JP2010226275A publication Critical patent/JP2010226275A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To effectively utilize resources of a multicore processor when processing a packet by using the multicore processor. <P>SOLUTION: A transmission control part 112 includes a plurality of output buffers in which processing-completed data packets are stored. The output buffer is provided, for instance, in each output port. A work control part 120 divides processing for a received data packet into a plurality of subworks and allocates each of the subworks to any of a plurality of threads 131 executed on a plurality of cores 130. In the allocation, the allocation of a subwork related to an output queue the use rate of which exceeds a threshold to the thread 131, is restricted. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、パケットの転送処理技術に関する。   The present invention relates to a packet transfer processing technique.

複数の入力ポートと複数の出力ポートとを備え、入力ポートから入力されたパケットをその宛先やQoSクラスに応じた出力ポートから出力する、パケットの転送処理を行う通信装置は、従来から種々のものが知られている(例えば、特許文献1参照)。   Conventionally, there are various communication devices for performing packet transfer processing, which have a plurality of input ports and a plurality of output ports, and output packets input from the input ports from the output ports according to their destinations and QoS classes. Is known (see, for example, Patent Document 1).

特許文献1に記載されている通信装置は、マルチコアプロセッサーを用いて構成されており、異なるIPフローに属するパケットに対する処理(デフラグメント処理、IPSec復号化処理、ネットワークアドレス変換処理など)を異なるプロセッサーコアで並列に処理することにより、スループットを向上させるようにしている。ここで、マルチコアプロセッサーとは、2つ以上のプロセッサーコアを1個のパッケージに集積したマイクロプロセッサーである。また、異なるIPフローに属するパケットとは、IPヘッダー、TCPヘッダーについて異なる5-tuple情報を持つパケットである。5-tuple情報とはIPパケットの「あて先IPアドレス」、「ソースIPアドレス」、「プロトコル番号」、TCP/UDPヘッダーの「あて先ポート番号」、「ソースポート番号」の5つの情報を指す。   The communication device described in Patent Document 1 is configured by using a multi-core processor, and processes for packets belonging to different IP flows (defragment processing, IPSec decoding processing, network address conversion processing, etc.) are different processor cores. The throughput is improved by processing in parallel. Here, the multi-core processor is a microprocessor in which two or more processor cores are integrated in one package. Further, packets belonging to different IP flows are packets having different 5-tuple information about the IP header and the TCP header. The 5-tuple information refers to five pieces of information: “destination IP address”, “source IP address”, “protocol number” of the IP packet, “destination port number” of the TCP / UDP header, and “source port number”.

特表2008−512950号公報Special table 2008-512950 gazette

ところで、プロセッサーによる処理の完了したパケットは、その出力先もしくはQoSクラスに対応した出力キューを介して外部に送出されるが、対応する出力キューが輻輳しバッファのオーバーフローが発生すると、処理済みのパケットが出力キューで破棄されてしまう。この場合、最終的に廃棄されたパケットに対して、プロセッサー処理能力、メモリー等のリソースが使用されるため、リソースが有効活用されていないことになる。しかし、特許文献1においては、このようなことは全く考慮されていない。なお、このような問題は、マルチコアプロセッサーを利用した通信装置特有のものではなく、シングルコアプロセッサーを利用した通信装置においても発生する。   By the way, a packet that has been processed by the processor is sent to the outside via an output queue corresponding to the output destination or QoS class. However, when the corresponding output queue is congested and a buffer overflow occurs, the processed packet is processed. Will be discarded in the output queue. In this case, since resources such as processor processing capacity and memory are used for the finally discarded packet, the resources are not effectively used. However, Patent Document 1 does not consider this at all. Such a problem is not unique to a communication device using a multi-core processor, but also occurs in a communication device using a single-core processor.

[発明の目的]
そこで、本発明の目的は、リソースを有効利用し、パケットに対する処理を効率的に行えるようにすることにある。
[Object of invention]
Therefore, an object of the present invention is to efficiently use resources and to efficiently process a packet.

本発明にかかる第1の通信装置は、
プロセッサーコアと、
処理の完了したパケットがストアされる複数の出力キューと、
受信したパケットに対する処理を複数のサブワークに分割し、該各サブワークを前記プロセッサーコア上で実行されるスレッドに割り当てるワークコントロール部とを備え、
前記ワークコントロール部は、前記複数の出力キューの中に輻輳している出力キューが存在する場合は、該輻輳している出力キューをストア先にしているパケットに関連するサブワークについてはスレッドの割り当てを制限する。
The first communication device according to the present invention is:
Processor cores,
Multiple output queues where processed packets are stored;
A work control unit that divides the processing for the received packet into a plurality of sub-work, and assigns each sub-work to a thread executed on the processor core;
When there is a congested output queue among the plurality of output queues, the work control unit assigns a thread to a subwork related to a packet having the congested output queue as a store destination. Limit.

本発明にかかる第1の通信方法は、
ワークコントロール部が、受信したパケットに対する処理を複数のサブワークに分割する第1のステップと、
前記ワークコントロール部が、サブワークをプロセッサーコア上で実行される複数のスレッドの内の何れかに割り当てる際、処理が完了したパケットがストアされる複数の出力キューの中に輻輳している出力キューが存在する場合は、該輻輳している出力キューをストア先にしているパケットに関連するサブワークについてはスレッドの割り当てを制限する第2のステップとを含む。
A first communication method according to the present invention includes:
A first step in which the work control unit divides the processing for the received packet into a plurality of sub-work;
When the work control unit assigns a sub work to any one of a plurality of threads executed on the processor core, an output queue that is congested in a plurality of output queues in which processed packets are stored The second step of restricting thread allocation for subwork related to a packet having the congested output queue as a store destination.

本発明によれば、廃棄される可能性が高いパケットの処理に向けられていたプロセッサー処理能力、メモリなどのリソースの割り当てを、廃棄される可能性が低い他のパケットの処理に向けることが可能となり、通信装置が備えているリソースを有効利用することが可能になるという効果を得ることができる。   According to the present invention, it is possible to direct allocation of resources such as processor processing capacity and memory, which has been aimed at processing a packet having a high possibility of being discarded, to processing of other packets having a low possibility of being discarded. Thus, it is possible to obtain an effect that the resources provided in the communication device can be effectively used.

図1は本発明にかかる通信装置の第1の実施の形態の構成例を示すブロック図である。FIG. 1 is a block diagram showing a configuration example of a first embodiment of a communication apparatus according to the present invention. 図2は主に受信コントロール部111の処理を説明するための図である。FIG. 2 is a diagram for mainly explaining the processing of the reception control unit 111. 図3はワークテーブル、パケットエレメントテーブル、および、アクションテーブルの関係を示す図である。FIG. 3 is a diagram showing the relationship among the work table, the packet element table, and the action table. 図4は送信コントロール部112の構成例を示すブロック図である。FIG. 4 is a block diagram illustrating a configuration example of the transmission control unit 112. 図5はワークコントロール部120の構成例を示すブロック図である。FIG. 5 is a block diagram illustrating a configuration example of the work control unit 120. 図6はパケットエレメントテーブル210の構成例を示す図である。FIG. 6 is a diagram illustrating a configuration example of the packet element table 210. 図7はワークテーブル211の構成例を示す図である。FIG. 7 is a diagram illustrating a configuration example of the work table 211. 図8はスレッド131の処理例を示すフローチャートである。FIG. 8 is a flowchart showing a processing example of the thread 131. 図9は本発明にかかる通信装置の第2の実施の形態で使用するワークコントロール部120の構成例を示すブロック図である。FIG. 9 is a block diagram showing a configuration example of the work control unit 120 used in the second embodiment of the communication apparatus according to the present invention. 図10は第2の実施の形態で利用するワークテーブル211の構成例を示す図である。FIG. 10 is a diagram illustrating a configuration example of the work table 211 used in the second embodiment.

次に、本発明の第1の実施の形態について図面を参照して詳細に説明する。   Next, a first embodiment of the present invention will be described in detail with reference to the drawings.

図1を参照すると、本発明の第1の実施の形態にかかる通信装置は、データパケットの転送処理を行うものであり、データパケット(単にパケットという場合もある)を受信する受信インタフェース部101と、処理済みのデータパケットを送信する送信インタフェース部102とを備えている。なお、図示を省略したが、受信インタフェース部101、送信インタフェース部102は、それぞれ複数の受信ポート、送信ポートを備えている。   Referring to FIG. 1, the communication apparatus according to the first embodiment of the present invention performs a data packet transfer process, and includes a reception interface unit 101 that receives a data packet (sometimes simply referred to as a packet). And a transmission interface unit 102 for transmitting the processed data packet. Although not shown, the reception interface unit 101 and the transmission interface unit 102 include a plurality of reception ports and transmission ports, respectively.

受信インタフェース部101及び送信インタフェース部102は、それぞれスイッチ部103a,103bを介してマルチコアプロセッサー部105内の受信コントロール部111及び送信コントロール部112に接続されている。ここで、スイッチ部103aは、複数のマルチコアプロセッサー部150の内のどのマルチコアプロセッサー部へデータパケットを出力すべきかを決定する機能を持っている。この場合、IPデータパケットの「あて先IPアドレス」、「ソースIPアドレス」、「プロトコル番号」などの情報からハッシュ関数を用いて算出した値をもとに、出力先のマルチコアプロセッサー部を決定する等の方式をとることが可能である。つまり、データパケットのIPフローに応じて出力先のマルチコアプロセッサー部を決定することが可能である。また、スイッチ部103bは、各マルチコアプロセッサー部150からのデータパケットを送信インタフェース部102へ出力する機能を持っている。   The reception interface unit 101 and the transmission interface unit 102 are connected to the reception control unit 111 and the transmission control unit 112 in the multi-core processor unit 105 via switch units 103a and 103b, respectively. Here, the switch unit 103a has a function of determining which multi-core processor unit among the plurality of multi-core processor units 150 is to output the data packet. In this case, the output destination multi-core processor unit is determined based on the value calculated using the hash function from information such as the “destination IP address”, “source IP address”, “protocol number”, etc. of the IP data packet. It is possible to take the following method. That is, it is possible to determine the output multicore processor unit according to the IP flow of the data packet. The switch unit 103b has a function of outputting the data packet from each multi-core processor unit 150 to the transmission interface unit 102.

また、受信コントロール部111及び送信コントロール部112はマルチコアプロセッサー部150の内部のバスインタフェース160と接続されており、それぞれ受信インタフェース部101から渡されたデータパケットをバスインタフェース160へ出力する機能、およびバスインタフェース160を介して送られてくるマルチコアプロセッサー部150の外部へのデータパケットをスイッチ103bを介して送信インタフェース部102に渡す機能を持っている。   The reception control unit 111 and the transmission control unit 112 are connected to the internal bus interface 160 of the multi-core processor unit 150, and each has a function of outputting a data packet passed from the reception interface unit 101 to the bus interface 160, and a bus. It has a function of passing a data packet sent to the outside of the multi-core processor unit 150 transmitted via the interface 160 to the transmission interface unit 102 via the switch 103b.

マルチコアプロセッサー部150の内部には複数のコア130 が配置されており、各コア130は、それぞれバスインタフェース160を介して、ワークコントロール部120、メインメモリ140、受信コントロール部111、送信コントロール部112に接続されている。また、各コア130はそれぞれ複数のスレッド131を同時に実行できる構成となっている。受信コントロール部111は、新規に受信したデータパケットをメインメモリ140にストアすると共に、ワークコントロール部120に対して上記データパケットの処理をワークという形で受け渡し、ワークに対するスレッド131の割り当てを依頼する機能を有する。   A plurality of cores 130 are arranged inside the multi-core processor unit 150, and each core 130 is connected to the work control unit 120, the main memory 140, the reception control unit 111, and the transmission control unit 112 via the bus interface 160, respectively. It is connected. Each core 130 is configured to be able to execute a plurality of threads 131 simultaneously. The reception control unit 111 stores a newly received data packet in the main memory 140, and passes the data packet processing to the work control unit 120 in the form of a work, and requests assignment of the thread 131 to the work. Have

ワークコントロール部120は、ワークを複数のサブワークに分割し、各サブワークにコア130上で実行されるスレッド131を割り当てる機能を有する。ここで、サブワークとしては、例えば、送信コントロール部112が備えている複数の出力キューの内のどの出力キューにデータパケットを格納するのかを決定する処理、デフラグメント処理、IPSec復号化処理、IPSec暗号化処理、ネットワークアドレス変更処理などがある。更に、ワークコントロール部120は、送信コントロール部112が備えている複数の出力キューの中に輻輳している出力キューが存在している場合は、その出力キューを格納先にしているパケットに関するサブワークについてはスレッド131の割り当てを制限する機能を有する。この機能により、将来的に廃棄される可能性が高いパケットによってリソースが消費されることを防ぐことができる。   The work control unit 120 has a function of dividing a work into a plurality of subwork and assigning a thread 131 to be executed on the core 130 to each subwork. Here, as the sub work, for example, a process for determining which output queue of the plurality of output queues included in the transmission control unit 112 stores the data packet, a defragment process, an IPSec decoding process, an IPSec There are encryption processing and network address change processing. In addition, when there is a congested output queue among the plurality of output queues provided in the transmission control unit 112, the work control unit 120 performs sub work related to the packet that stores the output queue. Has a function of restricting the assignment of threads 131. This function can prevent resources from being consumed by packets that are likely to be discarded in the future.

各コア130上で実行されるスレッド131は、ワークコントロール部120によってサブワークが割り当てられると、割り当てられたサブワークに応じた処理命令を実行する。ワーク処理のための入力情報、行うべき命令(アクション)はメインメモリ140から入手し、また、処理結果である出力情報はメインメモリ140に対して書き込む。また、処理の過程で得られたさらに細分化されたサブワークをワークコントロール部120に対して発行し、該当サブワークに対する他のスレッド131の割り当てを依頼することが可能である。   When a sub work is assigned by the work control unit 120, the thread 131 executed on each core 130 executes a processing instruction corresponding to the assigned sub work. Input information for work processing and an instruction (action) to be performed are obtained from the main memory 140, and output information as a processing result is written in the main memory 140. Further, it is possible to issue a further subdivided subwork obtained in the course of processing to the work control unit 120 and request assignment of another thread 131 to the subwork.

送信コントロール部112は、データパケットの送信先毎(出力ポート毎)、もしくはQoSクラス毎の出力キューを備えており、出力タイミングをスケジューリングした上で、スイッチ部103bを介して送信インタフェース部102へと送信する。更に、送信コントロール部112は、上記複数の出力キューの内の何れかに輻輳が発生した場合、輻輳の発生した出力キューを示す情報をワークコントロール部120に渡す機能を有する。   The transmission control unit 112 is provided with an output queue for each transmission destination (for each output port) of each data packet or for each QoS class, and after scheduling the output timing, the transmission control unit 112 is connected to the transmission interface unit 102 via the switch unit 103b. Send. Further, the transmission control unit 112 has a function of passing information indicating the output queue in which congestion occurs to the work control unit 120 when congestion occurs in any of the plurality of output queues.

受信インタフェース部101にて受信されたデータパケットは、スイッチ部103aを介してマルチコアプロセッサー部150の受信コントロール部111へと転送される。図2を参照すると、受信コントロール部111は、新規に受信したデータパケット201について、エレメントIDと呼ばれるユニークなID情報およびワークIDと呼ばれるユニークなID情報を採番する。採番したエレメントIDは、上記データパケット201を識別するために利用され、ワークIDは、データパケット201に対する処理(ワーク)を複数のサブワークに階層的に分割した際の最上位のサブワークを識別するために利用される。   The data packet received by the reception interface unit 101 is transferred to the reception control unit 111 of the multi-core processor unit 150 via the switch unit 103a. Referring to FIG. 2, the reception control unit 111 assigns unique ID information called an element ID and unique ID information called a work ID to a newly received data packet 201. The numbered element ID is used to identify the data packet 201, and the work ID is the highest level sub-work when the processing (work) for the data packet 201 is hierarchically divided into a plurality of sub-work. Used to identify.

また、受信コントロール部111は、受信したデータパケット201や、採番したエレメントIDおよびワークIDなどを含む情報をパケットエレメントテーブル210と呼ばれる形でメインメモリ140に格納すると共に、採番したワークIDおよびエレメントIDや、ワークの処理内容などを含む情報をワークテーブル211と呼ばれる形でメインメモリ140に格納する。更に、受信コントロール部111は、採番したエレメントIDおよびワークIDをそれぞれ送信コントロール部112およびワークコントロール部120へ送信する。なお、パケットエレメントテーブル210及びワークテーブル211については、図6及び図7を参照して後で詳しく説明する。   Further, the reception control unit 111 stores the received data packet 201 and information including the numbered element ID and work ID in the main memory 140 in a form called a packet element table 210, and the numbered work ID and Information including the element ID and the processing content of the work is stored in the main memory 140 in a form called a work table 211. Furthermore, the reception control unit 111 transmits the numbered element ID and work ID to the transmission control unit 112 and the work control unit 120, respectively. The packet element table 210 and the work table 211 will be described later in detail with reference to FIGS.

送信コントロール部112は、受信コントロール部111から渡されたエレメントIDをパケットキュー群220に格納し、パケット送信スケジューラー230を用いてスケジューリングする。そして、送出するデータパケットを決定すると、そのデータパケットをメインメモリ140から読み出し、送信インタフェース部102へ送る。なお、送信コントロール部112の詳細な構成及び動作については、後で、図4を参照して説明する。   The transmission control unit 112 stores the element ID passed from the reception control unit 111 in the packet queue group 220 and performs scheduling using the packet transmission scheduler 230. When the data packet to be transmitted is determined, the data packet is read from the main memory 140 and sent to the transmission interface unit 102. The detailed configuration and operation of the transmission control unit 112 will be described later with reference to FIG.

また、ワークコントロール部120は、受信コントロール部111から渡されたワークIDをワークキュー群221に格納し、その後、ワークスケジューラー231を用いてどのサブワークをどのスレッド131に割り当てるのかを決定する。そして、割り当て先の決定したサブワークのワークIDを割り当て先のスレッド131に渡す。また、ワークコントロール部120は、コア130上で動作しているスレッド131からサブワークIDが渡された場合も、同様の処理を行う。なお、ワークコントロール部120の詳細な構成及び動作については、後で、図5を参照して詳細に説明する。   Further, the work control unit 120 stores the work ID passed from the reception control unit 111 in the work queue group 221, and then determines which sub-work is assigned to which thread 131 using the work scheduler 231. Then, the work ID of the sub work determined as the assignment destination is passed to the assignment destination thread 131. Also, the work control unit 120 performs the same processing when a sub work ID is passed from the thread 131 operating on the core 130. The detailed configuration and operation of the work control unit 120 will be described later in detail with reference to FIG.

ここで、図3を参照して、データパケット201を管理するパケットエレメントテーブル210と、このデータパケット201についての各サブワークを管理するワーク管理テーブル211との関係について説明する。   Here, with reference to FIG. 3, the relationship between the packet element table 210 that manages the data packet 201 and the work management table 211 that manages each sub-work for the data packet 201 will be described.

データパケット201の受信時、受信コントロール部111は、上記データパケット201を管理するためのパケットエレメントテーブル210と、上記データパケット201に対する各サブワークの内の、最上位階層(第1階層)のサブワークを管理するためのワークテーブル211を生成する。この2つのテーブル210、211には、同一のエレメントID及びワークID301が設定されており、エレメントIDによって両テーブル210、211は関連付けられるようになっている。データパケット201に関連する各サブワークのワークテーブル211には、そのワークテーブル固有のワークIDが設定されると共に、自ワークテーブルの親及び子を示すワークIDが設定されており、これらによりワークテーブルの階層関係を認識できるようになっている。   When receiving the data packet 201, the reception control unit 111 receives the packet element table 210 for managing the data packet 201, and the sub-work of the highest layer (first layer) among the sub work for the data packet 201. A work table 211 for managing the work is generated. In these two tables 210 and 211, the same element ID and work ID 301 are set, and both tables 210 and 211 are associated with each other by the element ID. In the work table 211 of each sub work related to the data packet 201, a work ID unique to the work table is set, and a work ID indicating a parent and a child of the own work table is set. The hierarchical relationship can be recognized.

各サブワークで行われる具体的な処理内容はアクションと呼ばれており、メインメモリ140内に保存されているアクションテーブル310にその処理命令が記述されている。アクションテーブル310には、各サブワークに関連する処理命令が、それぞれ異なるアクションID302に関連付けて登録されており、各サブワークのワークテーブル211には、そのサブワークで実行する処理命令を示すアクションIDが登録されている。従って、アクションIDによって、サブワークとそのサブワークで実行する処理命令とを関連付けることができる。   Specific processing contents performed in each subwork are called actions, and processing instructions are described in an action table 310 stored in the main memory 140. In the action table 310, processing instructions related to each sub work are registered in association with different action IDs 302, and in the work table 211 of each sub work, an action ID indicating a processing instruction to be executed in that sub work is stored. Is registered. Therefore, it is possible to associate a subwork with a processing instruction executed in the subwork by the action ID.

図4を参照すると、送信コントロール部112は、パケットキュー群220と、パケット送信スケジューラー230とを備えている。   Referring to FIG. 4, the transmission control unit 112 includes a packet queue group 220 and a packet transmission scheduler 230.

パケットキュー群220は、出力先振り分けパケットキュー402、処理待ちパケット出力キュー群401、および、出力キュー群403から構成されている。   The packet queue group 220 includes an output destination distribution packet queue 402, a process waiting packet output queue group 401, and an output queue group 403.

処理待ちパケット出力キュー群401は、データパケットの出力インタフェース(出力ポート)ごと、もしくはQoSクラスごとの処理待ちパケット出力キューを備え、出力キュー群403も出力インタフェースごと、もしくはQoSクラスごとの出力キューを備えている。図4では処理待ちパケット出力キュー群401および出力キュー群403は、それぞれN個の処理待ちパケット出力キューおよび出力キューから構成されており、各処理待ちパケット出力キューおよび出力キューには、#1〜#Nの出力キューIDと呼ばれる識別子が付与されている。出力キューIDが#1〜#Nの処理待ちパケット出力キューから出力されるエレメントIDは、同一の出力キューIDを持つ出力キューに入力される。また図4に示すように、処理待ちパケット出力キュー群401の前段には、出力先振り分けパケットキュー402が配置されており、出力キューIDがまだ確定していないデータパケットに関して、そのエレメントIDをストアする。   The waiting packet output queue group 401 includes a waiting packet output queue for each data packet output interface (output port) or QoS class, and the output queue group 403 also has an output queue for each output interface or QoS class. I have. In FIG. 4, the process waiting packet output queue group 401 and the output queue group 403 are each composed of N process waiting packet output queues and output queues. An identifier called the output queue ID of #N is assigned. The element IDs output from the process waiting packet output queues whose output queue IDs are # 1 to #N are input to output queues having the same output queue ID. Also, as shown in FIG. 4, an output destination distribution packet queue 402 is arranged in the preceding stage of the processing-waiting packet output queue group 401, and the element ID is stored for a data packet for which the output queue ID has not yet been determined. To do.

受信コントロール部111から送信コントロール部112に送付されたデータパケット201のエレメントIDは、最初に出力先振り分けパケットキュー402にストアされる。このキュー402は、FIFO(First In First Out)の原則に従って、エレメントIDを処理待ちパケット出力キュー群401内の何れかのキューに振り分ける機能を持っている。出力先振り分けパケットキュー402は、キューからエレメントIDを出力する際に、出力するエレメントIDに対応したパケットエレメントテーブル(そのテーブルを識別するための情報として、上記エレメントIDと同一のエレメントIDが設定されているパケットエレメントテーブル、図6参照)をチェックする。このパケットエレメントテーブルに、出力キューIDが記録済みであれば(出力キューID有効ビットが“1”であれば)、処理待ちパケット出力キュー群401内の対応するキューへ該当エレメントIDの振り分けを行う。例えば、パケットエレメントテーブルに出力キューIDとして#3が記録されている場合は、処理待ちパケット出力キュー群401内のN個のキューの内、出力キューIDが#3の処理待ちパケット出力キューにエレメントIDを振り分ける。出力キューIDがパケットエレメントテーブルに記録されていない場合は、記録されるまで待ち続ける。なお、パケットエレメントテーブル210への出力キューIDの記録は、コア130で実行されているスレッド131によって行われるものである。スレッド131の動作については、後で図8を参照して詳しく説明する。   The element ID of the data packet 201 sent from the reception control unit 111 to the transmission control unit 112 is first stored in the output destination distribution packet queue 402. The queue 402 has a function of distributing element IDs to any queue in the processing-waiting packet output queue group 401 in accordance with FIFO (First In First Out) principles. When the output destination distribution packet queue 402 outputs an element ID from the queue, a packet element table corresponding to the output element ID (the same element ID as the above element ID is set as information for identifying the table). Packet element table (see FIG. 6). If the output queue ID has already been recorded in this packet element table (if the output queue ID valid bit is “1”), the corresponding element ID is distributed to the corresponding queue in the processing-waiting packet output queue group 401. . For example, if # 3 is recorded as the output queue ID in the packet element table, out of the N queues in the process waiting packet output queue group 401, the element is output to the process waiting packet output queue whose output queue ID is # 3. Assign IDs. If the output queue ID is not recorded in the packet element table, it continues to wait until it is recorded. Note that the recording of the output queue ID in the packet element table 210 is performed by the thread 131 executing in the core 130. The operation of the thread 131 will be described in detail later with reference to FIG.

処理待ちパケット出力キュー群401内の各キューにストアされたエレメントIDは、FIFOの原則に従って、同一の出力キューIDを持つ、出力キュー群403内の出力キューへと送信される。処理待ちパケット出力キュー群401は、キューからエレメントIDを出力する際に、対応したパケットエレメントテーブルをチェックする。該当するデータパケットに関するすべてのサブワークが完了し、ワーク完了ビットが“1”になっている場合、出力キュー群403内の対応する出力キューへエレメントIDの転送を行う。該当するパケットエレメントテーブルのワーク完了ビットが“0”になっている場合は、ワーク完了ビットが“1”になるまで待ち続ける。なお、ワーク完了ビットの設定は、コア130で実行されているスレッド131によって行われるものである。   The element ID stored in each queue in the process waiting packet output queue group 401 is transmitted to the output queue in the output queue group 403 having the same output queue ID according to the FIFO principle. The process waiting packet output queue group 401 checks the corresponding packet element table when outputting the element ID from the queue. When all sub-work related to the corresponding data packet is completed and the work completion bit is “1”, the element ID is transferred to the corresponding output queue in the output queue group 403. When the work completion bit of the corresponding packet element table is “0”, the process continues to wait until the work completion bit becomes “1”. The work completion bit is set by the thread 131 running on the core 130.

パケット送信スケジューラー230は、出力キュー群403を構成する各出力キューの先頭にストアされているエレメントIDを順次読み出し、読み出したエレメントIDに対応するデータパケットをメインメモリ140から読み出して送信インタフェース部102の該当する出力ポート(エレメントIDを読み出した出力キューに対応する出力ポート)へ送信する。また、パケット送信スケジューラー230は、出力キュー403群内の輻輳した出力キューを検出するため、出力キューの使用率を監視している。そして、使用率が予め定められている閾値を超える出力キューが発生した場合には、その出力キューに輻輳が発生したと判断し、その出力キューの出力キューIDを含んだ輻輳通知をワークコントロール120へ送信する。また、使用率が閾値以下に戻った出力キューが発生した場合には、その出力キューの出力キューIDを含んだ輻輳解消通知をワークコントロール部120へ送信する。なお、閾値は、例えば80%程度とすることができる。   The packet transmission scheduler 230 sequentially reads out the element ID stored at the head of each output queue constituting the output queue group 403, reads out the data packet corresponding to the read element ID from the main memory 140, and Transmit to the corresponding output port (the output port corresponding to the output queue from which the element ID was read). Further, the packet transmission scheduler 230 monitors the usage rate of the output queue in order to detect a congested output queue in the output queue 403 group. When an output queue whose usage rate exceeds a predetermined threshold occurs, it is determined that congestion has occurred in the output queue, and a congestion notification including the output queue ID of the output queue is sent to the work control 120. Send to. When an output queue whose usage rate has returned to a threshold value or less occurs, a congestion resolution notification including the output queue ID of the output queue is transmitted to the work control unit 120. Note that the threshold can be set to about 80%, for example.

図5を参照すると、ワークコントロール部120は、図2に示したワークキュー群221を構成するワーク出力キュー群501及び出力先振り分けワークキュー502と、ワークスケジューラー231と、ラウンドロビン機能部511、512と、出力キューIDチェックポイント521とを備えている。ワーク出力キュー群501は、処理待ちパケットキュー群401や出力キュー群403と同様にN個のワーク出力キューから構成されており、#1〜#Nの出力キューIDによって識別することができる。   Referring to FIG. 5, the work control unit 120 includes a work output queue group 501 and an output destination distribution work queue 502 that form the work queue group 221 illustrated in FIG. 2, a work scheduler 231, and round robin function units 511 and 512. And an output queue ID checkpoint 521. The work output queue group 501 is composed of N work output queues similarly to the process waiting packet queue group 401 and the output queue group 403, and can be identified by the output queue IDs # 1 to #N.

ワークコントロール部120は、受信コントロール部111或いはコア130上で実行されているスレッド131からワークIDが入力されると、このワークIDが所属するパケットエレメントテーブル(このワークIDによって示されるサブワークの生成元のパケットエレメントテーブル)の状態に応じて、このワークIDの分配先(ストア先)にするキューを決定する。具体的には、パケットエレメントテーブル210に出力キューID(図6参照)が記録済みであれば、ワーク出力キュー群501を構成するN個のキューの内の、上記出力キューIDによって特定されるキューに、ワークIDを分配する。これに対して、出力キューIDがパケットエレメントテーブルに記録されていない状態であれば、ワークIDを出力先振り分けワークキュー502へと分配する。   When a work ID is input from the thread 131 running on the reception control unit 111 or the core 130, the work control unit 120 generates a packet element table to which the work ID belongs (generates a subwork indicated by the work ID). In accordance with the state of the original packet element table), a queue to be a distribution destination (store destination) of this work ID is determined. Specifically, if the output queue ID (see FIG. 6) has been recorded in the packet element table 210, the queue specified by the output queue ID among the N queues constituting the work output queue group 501. Distribute the work ID. On the other hand, if the output queue ID is not recorded in the packet element table, the work ID is distributed to the output destination assignment work queue 502.

ワーク出力キュー群501を構成するN個のワーク出力キュー、および、出力先振り分けワークキュー502にストアされたワークIDは、FIFOの原則に従って、それぞれラウンドロビン機能部511、ラウンドロビン機能部512を経由して、ワークスケジューラー231へと配信される。つまり、ワークスケジューラー231は、各コア130に属するスレッド131の処理状況を確認し、ワークを処理していないスレッド131を見つけた場合は、ラウンドロビン機能部511、ラウンドロビン機能部512を経由して、ワーク出力キュー群501を構成するN個のワーク出力キュー、或いは、出力先振り分けワークキュー502からワークIDを引き取り、このワークIDを上記見つけたスレッド131に割り当てる。ここで、出力キューIDチェックポイント521は、出力先振り分けワークキュー502からワークID情報が引き出された場合に、該当ワークIDが所属するデータパケットのパケットエレメントテーブルの状態を再度チェックし、出力キューIDがパケットエレメントテーブルに記録済みであれば、ワーク出力キュー501へのワークIDの再振り分けを行うものである。出力キューIDがパケットエレメントテーブルに記録済みでなければ、ワークスケジューラー231はそのままワークIDを引き取る。   The N work output queues that make up the work output queue group 501 and the work IDs stored in the output destination distribution work queue 502 pass through the round robin function unit 511 and the round robin function unit 512, respectively, according to the FIFO principle. Then, it is delivered to the work scheduler 231. In other words, the work scheduler 231 checks the processing status of the threads 131 belonging to each core 130, and if it finds a thread 131 that is not processing a work, it passes through the round robin function unit 511 and the round robin function unit 512. The work ID is taken from the N work output queues constituting the work output queue group 501 or the output destination assignment work queue 502, and the work ID is assigned to the found thread 131. Here, the output queue ID check point 521 checks again the state of the packet element table of the data packet to which the corresponding work ID belongs when the work ID information is drawn from the output destination work queue 502, and the output queue ID Is recorded in the packet element table, the work ID is redistributed to the work output queue 501. If the output queue ID is not already recorded in the packet element table, the work scheduler 231 accepts the work ID as it is.

ワークコントロール部120は、送信コントロール部112内の出力キュー群403を構成するN個の出力キューの使用率が全て閾値以下である場合には、上述した処理を行う。これに対して、使用率が閾値を超える出力キューが発生した場合には、その出力キューに対応したワーク出力キューからのワークIDの出力を制限する。このようにする理由は、データパケットの出力キューが何らかの理由で輻輳状態にある場合、該当出力キューがオーバーフローしてしまう可能性があるためである。該当出力キューがオーバーフローして対応するデータパケットが廃棄された場合、該当するデータパケットに対応するワークに費やされたマルチコアプロセッサーの処理能力が無駄になってしまう。そこで、本実施の形態では、データパケットの出力キュー群403を構成するN個の出力キューの中に使用率がある一定の閾値を超える出力キューが発生した場合、該当出力キュー403が輻輳状態であるとみなし、該当出力キューに対応したワーク出力キューからのワークIDの出力を制限することで、将来的に廃棄される可能性が高いデータパケットに対する処理(サブワーク)へのスレッド131のアサイン(割り当て)を後回しにし、他の廃棄される可能性が少ないパケットに対する処理(サブワーク)をスレッド131にアサインすることができる。   The work control unit 120 performs the above-described process when the usage rates of the N output queues constituting the output queue group 403 in the transmission control unit 112 are all equal to or less than the threshold value. On the other hand, when an output queue whose usage rate exceeds the threshold value is generated, the output of the work ID from the work output queue corresponding to the output queue is limited. The reason for this is that if the output queue of data packets is in a congested state for some reason, the corresponding output queue may overflow. When the corresponding output queue overflows and the corresponding data packet is discarded, the processing capacity of the multi-core processor spent on the work corresponding to the corresponding data packet is wasted. Therefore, in this embodiment, when an output queue that exceeds a certain threshold with a usage rate among N output queues constituting the output queue group 403 of data packets occurs, the corresponding output queue 403 is in a congested state. By assigning the thread 131 to the processing (sub work) for a data packet that is likely to be discarded in the future by limiting the output of the work ID from the work output queue corresponding to the corresponding output queue (Assignment) can be postponed, and processing (subwork) for other packets that are less likely to be discarded can be assigned to the thread 131.

ここで、具体例を挙げて使用率が閾値を超える出力キューが発生した場合の動作について説明する。今、例えば、出力キュー群403を構成するN個の出力キューの内、出力キューIDが#1の出力キューの使用率が閾値を超えたとする。なお、以下の説明では、出力キューIDが#jの出力キューや、ワーク出力キューなどを、出力キュー#jや、ワーク出力キュー#jと記す場合がある。パケット送信スケジューラー230は、上記出力キュー#1の使用率が閾値を超えたことを検出すると、出力キューID「#1」を含んだ輻輳通知をワークコントロール部120へ送信する。   Here, an operation when an output queue having a usage rate exceeding a threshold value occurs will be described with a specific example. Now, for example, it is assumed that the usage rate of the output queue with the output queue ID # 1 out of N output queues constituting the output queue group 403 exceeds the threshold. In the following description, an output queue whose output queue ID is #j, a work output queue, or the like may be referred to as an output queue #j or a work output queue #j. When the packet transmission scheduler 230 detects that the usage rate of the output queue # 1 exceeds the threshold value, the packet transmission scheduler 230 transmits a congestion notification including the output queue ID “# 1” to the work control unit 120.

ワークコントロール部120内のワークスケジューラー231は、送信コントロール部112から出力キューID「#1」を含んだ輻輳通知が送られてくると、ワーク出力キュー群501を構成するN個のワーク出力キュー#1〜#Nの内の、ワーク出力キュー#1からのワークIDの出力を制限する。具体的には、例えば、ラウンドロビン機能部512に対して、ワーク出力キュー#1からのワークIDの読み出しを禁止することを指示する。これにより、ワーク出力キュー#1からはワークIDが出力されなくなる。あるいは、例えば、ラウンドロビン機能部512に対して、ワーク出力キュー#1からは、M回(Mは2以上の整数)の走査につき1回だけストアされているワークIDを読み出すことを指示する。これにより、ワーク出力キュー#1から出力されるワークIDの数は、他のワーク出力キュー#2〜#Nから出力されるワークIDの数の1/Mとなる。   When the work scheduler 231 in the work control unit 120 receives a congestion notification including the output queue ID “# 1” from the transmission control unit 112, the N work output queues # constituting the work output queue group 501 are sent. Limit the output of work ID from work output queue # 1 among 1 to #N. Specifically, for example, the round robin function unit 512 is instructed to prohibit reading of the work ID from the work output queue # 1. As a result, the work ID is not output from the work output queue # 1. Alternatively, for example, the round robin function unit 512 is instructed to read the work ID stored only once per M scans (M is an integer of 2 or more) from the work output queue # 1. As a result, the number of work IDs output from the work output queue # 1 is 1 / M of the number of work IDs output from the other work output queues # 2 to #N.

また、送信コントロール部112内のパケット送信スケジューラー230は、出力キュー#1の使用率が閾値以下に戻ったら、出力キューID「#1」を含んだ輻輳解消通知をワークコントロール部120へ送信する。これにより、ワークコントロール部120内のワークスケジューラー231は、ラウンドロビン機能部512に対して、輻輳通知受信時に行った制限を解除することを指示する。これにより、パケット出力キュー#1からも他のパケット出力キュー#2〜#Nと同様にワークIDが出力される。   Further, the packet transmission scheduler 230 in the transmission control unit 112 transmits a congestion resolution notification including the output queue ID “# 1” to the work control unit 120 when the usage rate of the output queue # 1 returns below the threshold value. As a result, the work scheduler 231 in the work control unit 120 instructs the round robin function unit 512 to release the restriction made when the congestion notification is received. As a result, the work ID is output from the packet output queue # 1 as well as the other packet output queues # 2 to #N.

次に、図6および図7を参照して、パケットエレメントテーブル210およびワークテーブル211について説明する。 Next, the packet element table 210 and the work table 211 will be described with reference to FIGS.

先ず、図6を参照してパケットエレメントテーブル210の各構成要素について説明する。   First, each component of the packet element table 210 will be described with reference to FIG.

・エレメントID…データパケット201の受信時に受信コントロール部111で採番されたエレメントIDが設定される。
・エレメントID有効ビット…エレメントIDが有効か否か、つまり、該当パケットエレメントテーブル210が有効か否かを表示する。
Element ID: The element ID assigned by the reception control unit 111 when the data packet 201 is received is set.
Element ID valid bit: Displays whether the element ID is valid, that is, whether the corresponding packet element table 210 is valid.

・ワークID…データパケット201の受信時に受信コントロール部111で採番されたワークIDが設定される。
・ワークID有効ビット…ワークIDが有効か否かを表示する。
Work ID: The work ID assigned by the reception control unit 111 when the data packet 201 is received is set.
• Work ID valid bit: Displays whether the work ID is valid.

・ワーク処理結果…ワークの処理結果が設定される。
・ワーク完了ビット…データパケット201に関するワークが完了したか否かを表示する。
-Work processing result: The work processing result is set.
Work completion bit: Displays whether or not the work related to the data packet 201 has been completed.

・出力キューID…送信コントロール部112のパケットキュー220について、該当パケットがどの出力キュー403から出力されるのかを示すID情報を記載する[データパケット201の格納先にする出力キューのID(出力キューID)が設定される]。
・出力キューID有効ビット…出力キューIDが有効か否かを表示する。
Output queue ID: For the packet queue 220 of the transmission control unit 112, describe ID information indicating from which output queue 403 the corresponding packet is output [output queue ID to be stored in the data packet 201 (output queue ID) is set].
• Output queue ID valid bit: Displays whether the output queue ID is valid.

・パケットキュー種別表示フィールド…該当パケットエレメントテーブル210のエレメントIDが、送信コントロール部112に設けられている出力先振り分けパケットキュー402、処理待ちパケット出力キュー群401または出力キュー群403の内の何れに収容されているかを表示する。 Packet queue type display field: The element ID of the corresponding packet element table 210 is assigned to any of the output destination distribution packet queue 402, the processing waiting packet output queue group 401 or the output queue group 403 provided in the transmission control unit 112. Displays whether it is contained.

・パケットキュー先行エレメントID…パケットキュー群220において、このパケットエレメントテーブル210の生成元となったデータパケットのエレメントIDの前段に先行して収容されているエレメントIDを表示する。
・パケットキュー先行エレメントID有効ビット…パケットキュー群220において、このパケットエレメントテーブル210の生成元となったデータパケットのエレメントIDの前段に先行して収容されているエレメントIDが存在するか否かを表示する。
Packet queue preceding element ID: In the packet queue group 220, the element ID accommodated prior to the preceding stage of the element ID of the data packet that is the generation source of the packet element table 210 is displayed.
Packet queue preceding element ID valid bit: In the packet queue group 220, it is determined whether or not there is an element ID accommodated before the element ID of the data packet that is the generation source of the packet element table 210. indicate.

・パケットキュー後続エレメントID…パケットキュー群220において、このパケットエレメントテーブル210の生成元となったデータパケットのエレメントIDの後段に後続して収容されているエレメントIDを表示する。
・パケットキュー後続エレメントID有効ビット…パケットキュー群220において、このパケットエレメントテーブル210の生成元となったデータパケットのエレメントIDの後段に後続して収容されているエレメントIDが存在するかどうかを表示する。
Packet Queue Subsequent Element ID: In the packet queue group 220, the element ID accommodated after the element ID of the data packet that is the generation source of the packet element table 210 is displayed.
Packet Queue Subsequent Element ID Valid Bit: Indicates whether or not there is an element ID subsequently stored in the packet queue group 220 following the element ID of the data packet that is the generation source of this packet element table 210 To do.

・データパケット…データパケットの内容がストアされる。 Data packet: The contents of the data packet are stored.

次に、図7を参照してワークテーブル211の構成要素について説明する。   Next, the components of the work table 211 will be described with reference to FIG.

・ワークID…このワークテーブル211によって管理されるサブワーク(該当サブワーク)を特定するID情報である。
・ワークID有効ビット…ワークIDが有効か否か、つまり、該当ワークテーブル211の情報が有効か否かを示す。
Work ID: ID information for specifying a sub work (corresponding sub work) managed by the work table 211.
Work ID valid bit: Indicates whether the work ID is valid, that is, whether the information in the corresponding work table 211 is valid.

・エレメントID…該当サブワークの生成元となっているデータパケットを示すエレメントIDが設定される。言い換えれば、該当サブワークによって処理が行われるデータパケットのエレメントIDが設定される。
・エレメントID有効ビット…エレメントIDが有効か否かを表示する。
Element ID: An element ID indicating a data packet that is a generation source of the corresponding subwork is set. In other words, the element ID of the data packet to be processed by the corresponding subwork is set.
• Element ID valid bit: Displays whether the element ID is valid.

・アクションID…該当サブワークが実際に行う処理(アクション)の内容を示したアクションテーブル310(図3参照)のID情報を示す。
・アクションID有効ビット…アクションIDが有効か否かを表示する。
Action ID: Indicates ID information of the action table 310 (see FIG. 3) indicating the contents of the processing (action) actually performed by the subwork.
• Action ID valid bit: Displays whether the action ID is valid.

・割り当てスレッドID…該当サブワークを割り当てるスレッド131のIDが設定される。
・割り当てスレッド完了ビット…該当サブワークに対するスレッド割り当てが完了し、割り当てスレッドIDが有効になったか否かを表示する。
Assigned thread ID: The ID of the thread 131 to which the subwork is assigned is set.
Assigned thread completion bit: Displays whether or not the assigned thread ID for the corresponding sub-work has been completed and the assigned thread ID has become valid.

・親ワークID…該当サブワークの生成元となった親サブワークがあれば、親サブワークのID情報を表示する。
・親ワークID有効ビット…親サブワークID情報が有効か否かを表示する。該当サブワークの生成元となった親サブワークが無ければ“0”を設定する。
-Parent work ID: If there is a parent subwork from which the corresponding subwork is generated, the ID information of the parent subwork is displayed.
-Parent work ID valid bit: Displays whether parent sub work ID information is valid. Set to “0” if there is no parent subwork that has generated the subwork.

・ワークキューID…このワークテーブル121のワークIDがワークコントロール部120内のどのキューにストアされているかを表示する。
・ワークキュー割り当て完了ビット…該当ワークテーブル121のワークID情報がワーク出力キュー501に割り当てられたか否かを表示する。
Work queue ID: Displays in which queue in the work control unit 120 the work ID of this work table 121 is stored.
Work queue assignment completion bit: Displays whether or not the work ID information of the corresponding work table 121 has been assigned to the work output queue 501.

・ワークキュー先行ワークID…ワークキュー群221において、このワークテーブル121のワークIDの前段に先行して収容されているワークIDを表示する。
・ワークキュー先行ワークID有効ビット…ワークキュー群221において、このワークテーブル121のワークIDの前段に先行して収容されているワークIDが存在するか否かを表示する。
Work queue preceding work ID: In the work queue group 221, the work ID accommodated prior to the work ID of the work table 121 is displayed.
Work queue preceding work ID valid bit: Displays whether or not there is a work ID stored in the work queue group 221 prior to the work ID of the work table 121.

・ワークキュー後続ワークID…ワークキュー群221において、このワークテーブル121のワークIDの後段に後続して収容されているワークIDを表示する。
・ワークキュー後続ワークID有効ビット…ワークキュー群221において、このワークテーブル121のワークIDの後段に後続して収容されているワークIDが存在する否かを表示する。
Work queue subsequent work ID: In the work queue group 221, the work ID stored subsequent to the work ID of the work table 121 is displayed.
Work queue subsequent work ID valid bit: Displays whether or not there is a work ID stored subsequent to the work ID of the work table 121 in the work queue group 221.

・処理経過情報…該当サブワークの処理を実行した結果をこのフィールドに随時アップデートして記録する。 Process progress information: The result of executing the process of the corresponding subwork is updated and recorded in this field as needed.

・サブワークID…該当サブワークの配下にサブワークが存在していれば、サブワークIDをテーブルに追加する。
・サブワークID発行完了ビット…該当サブワークの発行が完了しているか否かを表示する。
-Subwork ID: If a subwork exists under the subwork, add the subwork ID to the table.
・ Subwork ID issuance completion bit: Displays whether or not the subwork has been issued.

・サブワークアクションID…該当サブワークが実行するアクションのID情報を記録する。
・サブワーク入力データ…該当サブワークを発行する際、入力データとして使用したい値があれば記載する。
Subwork action ID: Records the ID information of the action executed by the subwork.
-Subwork input data: Enter any value you want to use as input data when issuing the subwork.

・サブワークID結果情報…該当サブワークが実行完了した際に得られた実行結果情報を記録する。
・サブワークID結果有効ビット…該当サブワークが実行完了して、サブワークID結果情報が有効になっているかどうかを表示する。
Subwork ID result information: Records the execution result information obtained when the corresponding subwork is completed.
Subwork ID result valid bit: Displays whether or not the subwork ID result information is valid after execution of the subwork is completed.

なお、最下位階層のワークテーブルには、項目「サブワークID発行完了ビット」「サブワークID」「サブワークアクションID」「サブワーク入力データ」「サブワークID結果有効ビット」「サブワークID結果情報」は存在しない。   In the work table at the lowest level, the items "subwork ID issue completion bit", "subwork ID", "subwork action ID", "subwork input data", "subwork ID result valid bit", "subwork ID result" There is no “information”.

次に、受信コントロール111がデータパケット201を受信した際に行うパケットエレメントテーブルの生成処理およびワークテーブルの生成処理について、図6および図7を参照して説明する。   Next, packet element table generation processing and work table generation processing performed when reception control 111 receives data packet 201 will be described with reference to FIGS. 6 and 7. FIG.

先ず、図6を参照してパケットエレメントテーブル210の生成処理について説明する。パケットエレメントテーブル210の生成処理においては、各項目に対して次のような設定を行う。   First, generation processing of the packet element table 210 will be described with reference to FIG. In the generation process of the packet element table 210, the following settings are made for each item.

・エレメントID…データパケット201の受信時に採番したエレメントIDを設定する。
・エレメントID有効ビット…エレメントIDが有効であることを示す“1”を設定する。
Element ID: Sets the element ID assigned when receiving the data packet 201.
• Element ID valid bit: Set “1” to indicate that the element ID is valid.

・ワークID…データパケット201の受信時に採番したワークIDを設定する。
・ワークID有効ビット…ワークIDが有効であることを示す“1”を設定する。
Work ID: Set the work ID assigned when receiving the data packet 201.
• Work ID valid bit: Set “1” to indicate that the work ID is valid.

・ワーク処理結果…未処理であることを設定する。
・ワーク完了ビット…ワークが完了していないことを示す“0”を設定する。
-Work processing result: Set that it is unprocessed.
• Work completion bit: Set “0” to indicate that the work is not completed.

・出力キューID…何も設定しない。出力キューIDは、サブワークが割り当てられたスレッドによって設定される。
・出力キューID有効ビット…出力キューIDが無効であることを示す“0”を設定する。
-Output queue ID: Set nothing. The output queue ID is set by the thread to which the sub work is assigned.
Output queue ID valid bit: Set “0” to indicate that the output queue ID is invalid.

・パケットキュー種別表示フィールド…何も設定しない。このフィールドは、送信コントロール部112によって設定される。 • Packet queue type display field: Nothing is set. This field is set by the transmission control unit 112.

・パケットキュー先行エレメントID…何も設定しない。この項目は、送信コントロール部112によって設定される。
・パケットキュー先行エレメントID有効ビット…無効であることを示す“0”を設定する。
-Packet queue preceding element ID: Nothing is set. This item is set by the transmission control unit 112.
Packet queue preceding element ID valid bit: “0” indicating invalid is set.

・パケットキュー後続エレメントID…何も設定しない。この項目は、送信コントロール部112によって設定される。
・パケットキュー後続エレメントID有効ビット…無効であることを示す“0”を設定する。
-Packet queue subsequent element ID: Nothing is set. This item is set by the transmission control unit 112.
• Packet queue subsequent element ID valid bit: “0” indicating invalidity is set.

・データパケット…受信したデータパケット201を設定する。 Data packet: The received data packet 201 is set.

次に、図7を参照してワークテーブル210の生成処理について説明する。ワークテーブル210の生成処理においては、各項目に対して次のような設定を行う。   Next, processing for generating the work table 210 will be described with reference to FIG. In the process of generating the work table 210, the following settings are made for each item.

・ワークID…データパケット201の受信時に採番したワークIDを設定する。
・ワークID有効ビット…ワークIDが有効であることを示す“1”を設定する。
Work ID: Set the work ID assigned when receiving the data packet 201.
• Work ID valid bit: Set “1” to indicate that the work ID is valid.

・エレメントID…データパケット201の受信時に採番したエレメントIDを設定する。
・エレメントID有効ビット…エレメントIDが有効であることを示す“1”を設定する。
Element ID: Sets the element ID assigned when receiving the data packet 201.
• Element ID valid bit: Set “1” to indicate that the element ID is valid.

・アクションID…最上位のサブワークでのアクションが定義されたアクションIDを設定する。
・アクションID有効ビット…アクションIDが有効であることを示す“1”を設定する。
-Action ID: Set the action ID that defines the action at the highest sub-work.
• Action ID valid bit: Set “1” to indicate that the action ID is valid.

・割り当てスレッドID…何も設定しない。この項目は、ワークコントロール部120によって設定される。
・割り当てスレッド完了ビット…スレッドへの割り当てが完了していないことを示す“0”を設定する。
-Assigned thread ID: Nothing is set. This item is set by the work control unit 120.
Assigned thread completion bit: “0” indicating that assignment to a thread has not been completed is set.

・親ワークID…自身が最上位階層のサブワークであり、親ワークは存在しないので、何も設定しない。
・親ワークID有効ビット…親ワークIDが無効であることを示す“0”を設定する。
-Parent work ID: Since it is the sub-work of the highest hierarchy and there is no parent work, nothing is set.
• Parent work ID valid bit: “0” indicating that the parent work ID is invalid is set.

・ワークキューID…この項目はワークコントロール部120によって設定されるので、何も設定しない。
・ワークキュー割り当て完了ビット…ワークキュー群への割り当てが完了していないことを示す“0”を設定する。
Work queue ID: Since this item is set by the work control unit 120, nothing is set.
Work queue assignment completion bit: “0” indicating that assignment to the work queue group is not completed is set.

・ワークキュー先行ワークID…この項目はワークコントロール部120によって設定されるので、何も設定しない。
・ワークキュー先行ワークID有効ビット…ワークキュー先行ワークIDが無効であることを示す“0”を設定する。
Work queue preceding work ID: Since this item is set by the work control unit 120, nothing is set.
Work queue preceding work ID valid bit: “0” indicating that the work queue preceding work ID is invalid is set.

・ワークキュー後続ワークID…この項目はワークコントロール部120によって設定されるので、何も設定しない。
・ワークキュー後続ワークID有効ビット…ワークキュー後続ワークIDが無効であることを示す“0”を設定する。
Work queue subsequent work ID: Since this item is set by the work control unit 120, nothing is set.
Work queue subsequent work ID valid bit: “0” indicating that the work queue subsequent work ID is invalid is set.

・処理経過情報…任意 (データパケット201中の特定フィールドを設定することも可能) ・ Processing progress information: Arbitrary (It is also possible to set specific fields in the data packet 201)

・サブワークID…自サブワークに対して予め定められているサブワークそれぞれについてサブワークIDを採番し、設定する。
・サブワークID発行完了ビット…未発行を示す“0”を設定する。
Subwork ID: Number and set a subwork ID for each of the subwork predetermined for the subwork.
• Subwork ID issuance completion bit: Set "0" to indicate that no work has been issued.

・サブワーク入力データ…該当サブワークを発行する際、入力データとして使用したい値があれば記録する。
・サブワークアクションID…サブワークで実施するアクションのアクションIDを設定する。
-Subwork input data: When issuing the subwork, record any values you want to use as input data.
-Subwork action ID: Set the action ID of the action to be executed in the subwork.

・サブワークID結果情報…この項目は、スレッドによって設定されるので、何も設定しない。
・サブワークID結果有効ビット…サブワークID結果情報が無効であることを示す“0”を設定する。
Subwork ID result information: This item is set by the thread, so nothing is set.
Subwork ID result valid bit: “0” indicating that the subwork ID result information is invalid is set.

受信コントロール部111は、メインメモリ140上にパケットエレメントテーブル210及びワークテーブル211を生成すると、最上位階層のサブワークのワークIDをワークコントロール部120に送付して該当サブワークへのスレッドへの割り当てを依頼すると共に、データパケット201のエレメントIDを送信コントロール部112へ送付する。なお、以下では、最上位階層のサブワークをサブワークW1と記す。また、サブワークW1のワークIDがID「IDW1」であり、データパケット201のエレメントIDが「ID201」であるとする。   When the reception control unit 111 generates the packet element table 210 and the work table 211 on the main memory 140, the reception control unit 111 sends the work ID of the sub-work of the highest hierarchy to the work control unit 120 and assigns the thread to the corresponding sub-work. And the element ID of the data packet 201 is sent to the transmission control unit 112. In the following, the sub-work at the highest level is referred to as sub-work W1. Further, it is assumed that the work ID of the sub work W1 is ID “IDW1” and the element ID of the data packet 201 is “ID201”.

ワークコントロール部120では、受信コントロール部111から送られてきた最上位階層のサブワークW1のワークID「IDW1」を出力先振り分けワークキュー502にストアし、送信コントロール部112では、受信コントロール部111から送られてきたエレメントID「ID201」を出力先振り分けパケットキュー402にストアする。   The work control unit 120 stores the work ID “IDW1” of the top-level sub-work W1 sent from the reception control unit 111 in the output destination work queue 502, and the transmission control unit 112 receives from the reception control unit 111. The transmitted element ID “ID201” is stored in the output destination distribution packet queue 402.

その後、ワークコントロール部120内のワークスケジューラー231によって、最上位階層のサブワークW1にスレッド131が割り当てられる。ワークスケジューラー231は、最上位のサブワークW1にスレッド131を割り当てると、該当するワークテーブル211に割り当てスレッドIDとして上記スレッドのIDを設定すると共に、割り当てスレッド完了ビットを“1”とする。   Thereafter, the work scheduler 231 in the work control unit 120 assigns the thread 131 to the sub-work W1 in the highest hierarchy. When the work scheduler 231 assigns the thread 131 to the uppermost sub work W1, the work scheduler 231 sets the ID of the thread as the assigned thread ID in the corresponding work table 211 and sets the assigned thread completion bit to “1”.

スレッド131は、最上位階層のサブワークW1のワークID「IDW1」が割り当てられると、図8のフローチャートに示す処理を開始する。   When the work ID “IDW1” of the sub-work W1 in the highest hierarchy is assigned, the thread 131 starts the process illustrated in the flowchart of FIG.

スレッド131は、先ず、該当ワークID「IDW1」のワークテーブル211に対して排他制御を実施する(ステップ1)。ここで排他制御の設定および解除手順について下記に定義する。   First, the thread 131 performs exclusive control on the work table 211 of the corresponding work ID “IDW1” (step 1). Here, the procedure for setting and releasing exclusive control is defined below.

[排他制御の設定手順]
・他のスレッドが該当ワークID「IDW1」のワークテーブル211に対して排他制御を行っているかどうかを確認する。
・他のスレッドが排他制御を行っている場合は排他制御が解除されるまで待ち続ける。他のスレッドが排他制御を行っている場合、下記の動作となる。
→該当スレッドは該当ワークIDのサブワークを実行できない
→該当スレッドは該当ワークIDのワークテーブル211にアクセスできない
・他のスレッドによる排他制御が行われていない場合は該当ワークID「IDW1」のワークテーブル211に対して排他制御を設定し、他のスレッドが該当ワークIDのワークを実行できず、なおかつ該当ワークID「IDW1」のワークテーブル211にアクセスできないようにする。
[Exclusive control setting procedure]
-Check whether other threads are performing exclusive control on the work table 211 with the corresponding work ID "IDW1".
-If other threads are performing exclusive control, continue to wait until exclusive control is released. When other threads are performing exclusive control, the following operations are performed.
-> The corresponding thread cannot execute the sub-work of the corresponding work ID-> The corresponding thread cannot access the work table 211 of the corresponding work ID-If the exclusive control is not performed by another thread, the work table of the corresponding work ID "IDW1" Exclusive control is set for 211 so that other threads cannot execute the work with the corresponding work ID and cannot access the work table 211 with the corresponding work ID “IDW1”.

[排他制御の解除手順]
・該当ワークID「IDW1」のワークテーブル211に対する排他制御を解除し、他のスレッドが該当ワークID「IDW1」のワークを実行できるようにすると共に、該当ワークID「IDW1」のワークテーブル211にアクセスできるようにする。
[Procedure for releasing exclusive control]
・ Release exclusive control for the work table 211 with the corresponding work ID “IDW1” so that other threads can execute the work with the corresponding work ID “IDW1” and access the work table 211 with the corresponding work ID “IDW1”. It can be so.

その後、スレッド131は、該当ワークテーブル211に設定されているアクションIDを参照し、対応するアクションテーブルに記載されている命令(命令列)を実行する(ステップ2)。命令を実行する際に引き渡す入力データと実行後に期待される出力データは下記になる。なお、命令を実行した後は、アクションID有効ビットを“0”とする。なお、命令列は、サブワークの初回発行時と再発行時とで処理内容を異なるものにすることができる。   Thereafter, the thread 131 refers to the action ID set in the corresponding work table 211 and executes an instruction (instruction sequence) described in the corresponding action table (step 2). The input data delivered when executing the instruction and the output data expected after execution are as follows. After executing the instruction, the action ID valid bit is set to “0”. It should be noted that the instruction sequence can have different processing contents when the sub-work is issued for the first time and when it is re-issued.

[入力データ]ワークID、アクションID、処理経過情報、各サブワークIDの結果情報
[出力データ]処理経過情報 (情報をアップデートする)、サブワークID、サブワークアクションID、サブワーク入力データ、出力キューID
[Input data] Work ID, action ID, process progress information, result information of each sub work ID [Output data] Process progress information (update information), sub work ID, sub work action ID, sub work input data, output Queue ID

今、例えば、ステップ2において、データパケット201をストアする出力キューを決定したとすると、スレッド131は、上記出力キューの出力キューID(例えば、#1とする)をデータパケット201用のパケットエレメントテーブル210に設定すると共に、出力キューID有効ビットを“1”とする。これにより、送信コントロール部112は、出力先振り分けパケットキュー402にストアされている、データパケット201を特定するエレメントIDを処理待ちパケット出力キュー群401を構成するキューの内の、出力キューIDが#1のキューにストアする。なお、パケットエレメントテーブル210に出力キューIDを設定するなど、パケットエレメントテーブル210を更新する場合には、パケットエレメントテーブル210に対して排他制御を実施した上で更新を行い、その後、排他制御を解除する。   Now, for example, assuming that the output queue for storing the data packet 201 is determined in step 2, the thread 131 uses the output queue ID (for example, # 1) of the output queue as a packet element table for the data packet 201. In addition, the output queue ID valid bit is set to “1”. As a result, the transmission control unit 112 sets the element ID for specifying the data packet 201 stored in the output destination distribution packet queue 402 to the output queue ID # of the queues constituting the processing-waiting packet output queue group 401. Store in queue 1 When updating the packet element table 210, such as setting an output queue ID in the packet element table 210, the exclusive control is performed on the packet element table 210, and then the exclusive control is released. To do.

その後、スレッド131は、サブワークW1についてのワークテーブル211のサブワークID発行完了ビットに基づいて、未発行のサブワークがあるか否かを判定する(ステップ3)。そして、全て“1”となっている場合は、未発行のサブワークが無いと判断してステップ4へ進み、そうでない場合は、未発行のサブワークがあると判断してステップ13へ進む。なお、ワークテーブルに項目「サブワークID発行完了ビット」が存在しない場合は、未発行のサブワークが無いと判断するものとする。今、処理対象にしているサブワークW1は、最上位階層のサブワークであり、まだ、サブワークの発行処理を行っていないので、スレッド131は、ステップ13に進む。   Thereafter, the thread 131 determines whether there is an unissued sub-work based on the sub-work ID issuance completion bit of the work table 211 for the sub-work W1 (step 3). If all are “1”, it is determined that there is no unissued subwork, and the process proceeds to step 4; otherwise, it is determined that there is an unissued subwork, and the process proceeds to step 13. When the item “subwork ID issuance completion bit” does not exist in the work table, it is determined that there is no unissued subwork. The sub-work W1 to be processed now is the top-level sub-work and has not yet performed the sub-work issue process, so the thread 131 proceeds to step 13.

ステップ13において、スレッド131は、未発行のサブワーク(第2階層のサブワーク)の発行処理を行う。具体的には、最上位のサブワークW1のワークテーブル211を参照し、サブワークID発行完了ビットが“0”となっているサブワークIDそれぞれについて、メインメモリ140上に新規のワークテーブルを生成する。その後、ワークコントロール部120へ該当サブワークID(第2階層のサブワークのサブワークID)を送付する。なお、ワークテーブルの生成方法は、前述した最上位階層のワークテーブルの生成方法と下記の点を除いて同じである。また、この例では、m個のサブワークが発行されたとし、各サブワークをサブワークW21〜W2mと記す。また、該当サブワークが属するデータパケットが廃棄されている場合はサブワークの発行を行わない(この場合、該当ワークが属するパケットエレメントテーブルのエレメントIDが“0”となっていることで判別可能である)。   In step 13, the thread 131 performs issuing processing for unissued subwork (second-level subwork). Specifically, referring to the work table 211 of the highest sub work W1, a new work table is generated on the main memory 140 for each sub work ID for which the sub work ID issuance completion bit is “0”. To do. Thereafter, the corresponding sub-work ID (sub-work ID of the second-level sub-work) is sent to the work control unit 120. The method for generating the work table is the same as the method for generating the work table in the highest hierarchy described above except for the following points. In this example, it is assumed that m subworkes have been issued, and each subwork is denoted as subwork W21 to W2m. In addition, if the data packet to which the subwork belongs is discarded, the subwork is not issued (in this case, it can be identified by the fact that the element ID of the packet element table to which the work belongs belongs to “0”). is there).

・アクションID…最上位のサブワークW1のワークテーブル211中のアクションIDを設定する。
・親ワークID…該当サブワークW2i(1≦i≦m)の発行元となったサブワークW1のワークIDを設定する。
・親ワークID有効ビット…“1”を設定する。
・処理経過情報…サブワークID入力データを使用する。
Action ID: Sets the action ID in the work table 211 of the highest sub work W1.
Parent work ID: Set the work ID of the sub work W1 that has issued the corresponding sub work W2i (1 ≦ i ≦ m).
• Parent work ID valid bit: Set “1”.
-Process progress information: Sub-work ID input data is used.

その後、スレッド131は、サブワークW1のワークテーブル211に対する排他制御を解除し、その処理を終了する。   Thereafter, the thread 131 releases the exclusive control of the sub work W1 with respect to the work table 211, and ends the process.

一方、第2階層のサブワークW2iのサブワークID(IDW2iとする)が渡されたワークコントロール部120は、このサブワークW2iの生成元となったデータパケット201のパケットエレメントテーブル210の出力キューID(#1が設定されている)を参照し、上記サブワークID「IDW2i」を、ワーク出力キュー群501を構成するワーク出力キューの内の、出力キューIDが#1のキューにストアする。その後、ワークコントロール部120内のワークスケジューラー231は、この第2階層のサブワークID「IDW2i」にスレッド131(最上位階層のサブワークIDを割り当てたスレッドと同じスレッドである場合もあるし、異なるスレッドである場合もある)を割り当てる。   On the other hand, the work control unit 120 to which the sub-work ID (IDW2i) of the sub-work W2i in the second hierarchy is passed is the output queue ID of the packet element table 210 of the data packet 201 that is the generation source of this sub-work W2i (# 1 is set), the sub work ID “IDW2i” is stored in the queue whose output queue ID is # 1 among the work output queues constituting the work output queue group 501. Thereafter, the work scheduler 231 in the work control unit 120 may be the same thread as the thread 131 (the thread assigned the top-level sub-work ID to the second-level sub-work ID “IDW2i” or different. May be a thread).

第2階層のサブワークID「IDW2i」が割り当てられたスレッド131は、前述したステップ1、2の処理を行った後、未発行のサブワークが存在するか否かを判定する(ステップ3)。今、第2階層が最下位層であるとすると、項目「サブワークID発行完了ビット」が存在しないので、スレッド131は、未発行のサブワークが無いと判断してステップ4に進む。   The thread 131 to which the sub-work ID “IDW2i” of the second hierarchy is assigned determines whether or not there is an unissued sub-work after performing the processing of Steps 1 and 2 described above (Step 3). If the second layer is the lowest layer, the item “subwork ID issuance completion bit” does not exist. Therefore, the thread 131 determines that there is no unissued subwork and proceeds to step 4.

ステップ4では、未完了のサブワークが存在するか否かを判定する。未完了のサブワークが存在するか否かは、現在処理対象にしているサブワークW2iのワークテーブルに設定されているサブワークID結果有効ビットに基づいて行う。即ち、サブワークID結果有効ビットが全て“1”である場合には未完了のサブワークが無いと判断し、そうで無い場合は未完了のサブワークが存在すると判断する。また、ワークテーブルに項目「サブワークID結果有効ビット」が無い場合も、未完了のサブワークが無いと判断する。現在処理対象にしているサブワークW2iは最下位階層のサブワークであり、そのワークテーブルには項目「サブワークID結果有効ビット」が存在しないので、スレッド131は、未完了のサブワークが無いと判断し、ステップ5に進む。   In step 4, it is determined whether or not there is an incomplete subwork. Whether or not there is an incomplete subwork is determined based on the subwork ID result valid bit set in the work table of the subwork W2i currently being processed. That is, if all the subwork ID result valid bits are “1”, it is determined that there is no incomplete subwork, and if not, it is determined that there is an incomplete subwork. Also, if there is no item “subwork ID result valid bit” in the work table, it is determined that there is no incomplete subwork. The sub-work W2i that is currently being processed is the sub-work of the lowest hierarchy, and since the item “sub-work ID result valid bit” does not exist in the work table, the thread 131 has no incomplete sub-work. Judge and go to step 5.

ステップ5では、現在処理対象にしているサブワークW2iを発行した、親となるサブワークが存在するか否かを判断する。具体的には、サブワークW2iのワークテーブルに登録されている親ワークID有効ビットが“1”であれば、親となるサブワークが存在すると判断し、“0”であれば、親となるサブワークが存在しないと判断する。そして、親となるサブワークが存在する場合には、ステップ6に進み、存在しない場合は、ステップ14へ進む。この例の場合、処理対象にしているサブワークW2iは、第2階層のサブワークであり、親となるサブワークW1が存在するので、ステップ6へ進むことになる。   In step 5, it is determined whether or not there is a parent sub-work that has issued the sub-work W2i currently being processed. Specifically, if the parent work ID valid bit registered in the work table of the sub work W2i is “1”, it is determined that there is a parent sub work, and if it is “0”, it becomes the parent. Judge that there is no subwork. If the parent sub-work exists, the process proceeds to step 6; otherwise, the process proceeds to step 14. In this example, the sub-work W2i to be processed is the second-level sub-work, and the parent sub-work W1 exists, so the process proceeds to step 6.

ステップ6では、サブワークW2iの親となるサブワークW1のワークテーブルに対する排他制御を行う。次のステップ7では、サブワークW1に設定されているサブワークID結果情報の内、現在実行中のワークID「IDW2i」と一致するものを更新し、更に、サブワークID結果有効ビットを“1”に変更する。   In step 6, exclusive control is performed on the work table of the sub work W1 which is the parent of the sub work W2i. In the next step 7, the sub work ID result information set in the sub work W1 is updated with the work ID “IDW2i” that is currently being executed, and the sub work ID result valid bit is set to “1”. Change to "".

次の、ステップ8では、処理対象にしているサブワークW2iの親となるサブワークW1において、全てのサブワークW21〜W2mが完了しているか否かを、サブワークW1のサブワークID結果有効ビットが全て“1”になっているか否かに基づいて判断する。そして、全てが“1”になっている場合は、サブワークW1の全てのサブワークW21〜W2mが完了していると判断してステップ9に進み、そうでない場合はステップ10に進む。   In the next step 8, in subwork W1 that is the parent of the subwork W2i to be processed, whether or not all subwork W21 to W2m are completed, subwork ID result valid bit of subwork W1 Is determined based on whether or not all are “1”. If all of them are “1”, it is determined that all the sub-work W21 to W2m of the sub-work W1 are completed, and the process proceeds to step 9; otherwise, the process proceeds to step 10.

ステップ9では、サブワークW2iの親であるサブワークW1のワークID「IDW1」をワークコントロール部120へ送信し、サブワークW1へのスレッド131の割り当てを要求する。次のステップ10では、サブワークW1のワークテーブルに対する排他制御を解除する。ステップ11では、サブワークW2i及びそれよりも下位のサブワークの処理が完了したと判断し、サブワークW2iのワークテーブルのワークID有効ビットを“0”とする。そして、最後に、現在処理対象にしているサブワークW2iのワークテーブルに対する排他制御を解除する(ステップ12)。   In step 9, the work ID “IDW1” of the sub work W1 that is the parent of the sub work W2i is transmitted to the work control unit 120, and the assignment of the thread 131 to the sub work W1 is requested. In the next step 10, exclusive control for the work table of the sub work W1 is released. In step 11, it is determined that the processing of the sub work W2i and lower sub work is completed, and the work ID valid bit of the work table of the sub work W2i is set to “0”. Finally, the exclusive control for the work table of the sub work W2i that is currently being processed is released (step 12).

ステップ9においてワークコントロール部120に送信された最上位階層のサブワークW1のワークID「IDW1」は、ワーク出力キュー群501内の出力キューIDが「#1」のキューにストアされ、ワークスケジューラー231によってスレッド131が割り当てられる。   The work ID “IDW1” of the sub-work W1 of the highest hierarchy transmitted to the work control unit 120 in step 9 is stored in the queue having the output queue ID “# 1” in the work output queue group 501, and the work scheduler 231 The thread 131 is assigned by.

最上位階層のサブワークW1が割り当てられたスレッド131は、前述したステップ1、2の処理を行った後、未発行のサブワークがあるか否かを調べる(ステップ3)。この例では、既にサブワークW1は、全てのサブワークW21〜W2mを発行済みであり、該当するワークテーブルのサブワークID発行完了ビットが“1”となっているので、ステップ3の判断結果はN(No)となり、ステップ4の処理が行われる。   The thread 131 to which the sub-work W1 of the highest hierarchy is assigned performs the processing of Steps 1 and 2 described above, and then checks whether there is an unissued sub-work (Step 3). In this example, since the sub work W1 has already issued all the sub work W21 to W2m and the sub work ID issuance completion bit of the corresponding work table is “1”, the determination result of step 3 is N (No), and the process of step 4 is performed.

ステップ4では、サブワークW1に未完了のサブワークが存在するか否かを調べる。この例では、未完了のサブワークは存在しないので、ステップ4の判断結果はNとなり、ステップ5の処理が行われる。   In step 4, it is checked whether or not there is an incomplete subwork in subwork W1. In this example, since there is no incomplete subwork, the determination result in step 4 is N, and the process in step 5 is performed.

ステップ5では、サブワークW1に親となるサブワークが存在するか否かを調べる。この例では、サブワークW1は最上位階層のサブワークであるので判断結果はNとなり、ステップ14の処理が行われる。   In step 5, it is checked whether or not a sub work as a parent exists in the sub work W1. In this example, since the sub work W1 is the sub work of the highest hierarchy, the determination result is N, and the process of step 14 is performed.

ステップ14では、サブワークW1のワークテーブルの処理経過情報や、サブワークW1配下のサブワークW21〜W2mのワークテーブルのサブワークID結果情報を使用して、ワーク発生元となったデータパケット201のパケットエレメントテーブル210を更新(例えば、データパケットのアドレスの書き換えなど)する。なお、パケットエレメントテーブル210を更新する場合は、排他制御を実行した後、更新処理を行う。   In step 14, the processing progress information of the work table of the sub work W1 and the sub work ID result information of the work tables of the sub work W21 to W2m under the sub work W1 are used to determine the data packet 201 that is the work generation source. Update the packet element table 210 (for example, rewrite the address of the data packet). In addition, when updating the packet element table 210, after performing exclusive control, an update process is performed.

本実施の形態によれば、廃棄される可能性が高いデータパケットの処理に向けられていたプロセッサー処理能力、メモリなどのリソースの割り当てを、廃棄される可能性が低い他のデータパケットの処理に向けることが可能となり、通信装置が備えているリソースを有効利用することが可能になるという効果を得ることができる。その理由は、出力キュー群403を構成するキューの中に輻輳している出力キューが存在する場合は、該輻輳している出力キューを格納先にしているパケットに関連するサブワークについてはスレッドの割り当てを制限するようにしているからである。   According to the present embodiment, the allocation of resources such as processor processing capacity and memory, which has been directed to processing data packets that are likely to be discarded, can be used for processing other data packets that are unlikely to be discarded. Therefore, it is possible to obtain an effect that it is possible to effectively use resources included in the communication device. The reason is that when there is a congested output queue among the queues constituting the output queue group 403, the thread of the subwork related to the packet storing the congested output queue is stored in the thread. This is because the allocation is limited.

また、本実施の形態では、同一フローに属するデータパケットを同一の出力キューにストアし、データパケットに関する全てのサブワークが完了した後、出力キューから送出するようにしているので、1つのデータパケットに関する複数のサブワークを任意の複数のスレッド131で並行して実行させることが可能になり、処理効率が向上する。   In this embodiment, since data packets belonging to the same flow are stored in the same output queue and all sub-work related to the data packet is completed, it is sent out from the output queue. A plurality of sub-work can be executed in parallel by an arbitrary plurality of threads 131, and the processing efficiency is improved.

更に、本実施の形態では、サブワークを任意のスレッド131に割り当てることができるので、コア数やスレッド数がデバイスのアップグレードにより増加した場合でも処理アルゴリズムを修正することなく、容易に処理能力の向上を図ることが可能となる。   Furthermore, in this embodiment, since sub-work can be assigned to any thread 131, even if the number of cores or the number of threads increases due to device upgrade, the processing algorithm can be easily improved without correcting the processing algorithm. Can be achieved.

[本発明の第2の実施の形態]
次に、本発明にかかる通信装置の第2の実施の形態について説明する。本実施の形態は、サブワークに優先度を付与し、優先度の高いサブワークに優先的にスレッドを割り当てるようにしたことを特徴とする。以下では、第1の実施の形態との相違点について説明する。
[Second embodiment of the present invention]
Next, a second embodiment of the communication apparatus according to the present invention will be described. The present embodiment is characterized in that a priority is assigned to a sub work and a thread is preferentially assigned to a sub work having a high priority. Hereinafter, differences from the first embodiment will be described.

本実施の形態では、第1の実施の形態で利用するワークテーブルに「ワーク優先度」という項目を追加した図10に示すワークテーブルを利用する。なお、本実施の形態では、ワーク優先度は、第1レベル〜第kレベルのk段階であるとする。第1レベルが最も優先度が高いとする。   In the present embodiment, the work table shown in FIG. 10 is used in which the item “work priority” is added to the work table used in the first embodiment. In this embodiment, it is assumed that the work priorities are k levels from the first level to the k-th level. Assume that the first level has the highest priority.

また、本実施の形態では、ワークコントロール部120として図9に示す構成を有するものを利用する。本実施の形態のワークコントロール部120は、ワーク出力キュー群501の代わりにワーク出力キュー群501aを備えている点、および、ラウンドロビン機能部512の代わりにラウンドロビン機能部512aを備えている点が、図5に示した第1の実施の形態のワーク出力キュー群501と相違している。   In the present embodiment, the work control unit 120 having the configuration shown in FIG. 9 is used. The work control unit 120 according to the present embodiment includes a work output queue group 501a instead of the work output queue group 501, and a round robin function unit 512a instead of the round robin function unit 512. However, it is different from the work output queue group 501 of the first embodiment shown in FIG.

第1の実施の形態のワーク出力キュー群501はN個(出力キュー群403を構成するキューの数と同数)のキューによって構成されているのに対し、本実施の形態のワーク出力キュー群501aは、N×k個のキューによって構成されている。即ち、本実施の形態のワーク出力キュー群501aは、1つの出力キューに対して、ワーク優先度の段階数分(k個)のキューから構成されている。別の言い方をすれば、1つの出力キューIDに対応付けて、ワーク優先度「第1レベル〜第kレベル」用のk個のキューが設けられている。ワークコントロール部120は、コア130からワークIDが渡された場合、ストア先にするキューの出力キューIDが既に確定している場合は、上記出力キューIDによって特定されるk個のキューの内に、上記ワークIDのワーク優先度に応じたキューにストアする。なお、図9においては、出力キューID「X」に対応する第Yレベルのキューには、符号LX-Yを付している。   The work output queue group 501 of the first embodiment is composed of N queues (the same number as the number of queues constituting the output queue group 403), whereas the work output queue group 501a of the present embodiment. Is composed of N × k queues. That is, the work output queue group 501a of the present embodiment is composed of queues corresponding to the number of stages of work priority (k pieces) for one output queue. In other words, k queues for work priorities “first level to k-th level” are provided in association with one output queue ID. When the work ID is passed from the core 130, and the output queue ID of the queue to be stored is already determined, the work control unit 120 includes the k queues identified by the output queue ID. , Store in a queue according to the work priority of the work ID. In FIG. 9, the Y-th level queue corresponding to the output queue ID “X” is denoted by the symbol LX-Y.

ラウンドロビン機能部512aは、ワークIDの出力を停止もしくは抑制(選択される割合を他のキューよりも少なくする)するキューの出力キューIDがワークスケジューラー231によって指定された場合、上記出力キューIDに対応するk個のキューからのワークIDの出力を停止もしくは抑制する。また、ラウンドロビン機能部512aは、ワーク優先度が高いキューにストアされているワークIDを優先的に出力する。例えば、ワーク優先度が最も高い第1レベルのキューからはk回の走査全てにおいてワークIDを出力し、第2レベルのキューからはk回の走査の内の(k-1)回の走査においてワークIDを出力し、最もワーク優先度が低い第kレベルのキューからはk回の走査の内の1回の走査においてワークIDを出力する。   When the work queue 231 specifies the output queue ID of the queue that stops or suppresses the output of the work ID (decreases the selected ratio from other queues), the round robin function unit 512a uses the output queue ID described above. Stops or suppresses output of work IDs from the corresponding k queues. Further, the round robin function unit 512a preferentially outputs work IDs stored in a queue having a high work priority. For example, the work ID is output in all k scans from the first level queue with the highest work priority, and (k-1) of the k scans are output from the second level queue. The work ID is output, and the work ID is output in one of the k scans from the k-th level queue having the lowest work priority.

ワークテーブルへのワーク優先度の設定は、ワークコントロール部120において行われると共に、図8に示したフローチャートのステップ13において行われる。   The setting of the work priority in the work table is performed in the work control unit 120 and in step 13 of the flowchart shown in FIG.

ワークコントロール部120では、最上位階層のサブワークに対応するワークテーブルを生成する際、予め定められているワーク優先度を設定する。   The work control unit 120 sets a predetermined work priority when generating a work table corresponding to the sub-work of the highest hierarchy.

ステップ13において、スレッド131は、例えば、次のようなサブワークに高いワーク優先度を与える。   In step 13, for example, the thread 131 gives a high work priority to the following sub work.

・データパケットの出力キューIDを算出するサブワーク…データパケットの出力キューIDを求める操作を優先的に処理すると、マルチコアプロセッサー部150のリソースを効果的にサブワークに対して配分することが可能となると考えられる。そのため、データパケットの出力キューIDを算出するサブワークのワーク優先度を高くする。
・処理待ちパケット出力キュー(処理待ちパケット出力キュー群401を構成しているキュー)が輻輳しているデータパケットのサブワーク…処理待ちパケット出力キューが輻輳しているデータパケットに所属するサブワークは処理が遅れていると考えられるため、該当サブワークの優先度を上げる。なお、処理待ちパケット出力キューが輻輳しているか否かは、例えば、キューの使用率が閾値を超えているか否かにより判断する。
・QoSクラスが高いデータパケットに対応するサブワーク
・その他、処理単位が大きいワーク、配下のサブワーク数が大きいワーク、メモリーを大量に確保しているワーク等
-Subwork for calculating the output queue ID of the data packet: By preferentially processing the operation for obtaining the output queue ID of the data packet, the resources of the multi-core processor unit 150 can be effectively distributed to the subwork. It is considered to be. For this reason, the work priority of the sub work for calculating the output queue ID of the data packet is increased.
• Subwork of data packets that are congested in the queued packet output queue (queues that constitute the queued packet output queue group 401). Since the processing is considered to be delayed, raise the priority of the corresponding subwork. Note that whether or not the processing-waiting packet output queue is congested is determined based on, for example, whether or not the queue usage rate exceeds a threshold value.
・ Sub work corresponding to data packet with high QoS class ・ Other work with large processing unit, work with large number of sub-work under it, work with large amount of memory, etc.

本実施の形態によれば、第1の実施の形態で得られる効果に加え、更に処理を効率的に行うことが可能になるという効果を得ることができる。その理由は、ワーク優先度の高いワークに優先的にスレッドを割り当てるようにしているからである。   According to the present embodiment, in addition to the effect obtained in the first embodiment, it is possible to obtain an effect that the processing can be performed more efficiently. The reason is that threads are preferentially assigned to work having a high work priority.

本発明は、パケットの転送処理を行う通信装置に利用可能である。   The present invention can be used in a communication apparatus that performs packet transfer processing.

101…受信インタフェース部
102…送信インタフェース部
103a,103b…スイッチ部
111…受信コントロール部
112…送信コントロール部
120…ワークコントロール部
130…コア
131…スレッド
140…メインメモリ
150…マルチコアプロセッサー部
160…バスインタフェース
201…データパケット
210…パケットエレメントテーブル
211…ワークテーブル
220…パケットキュー群
221…ワークキュー群
230…パケット送信スケジューラー
231…ワークスケジューラー
401…処理待ちパケット出力キュー群
402…出力先振り分けパケットキュー
403…出力キュー群
501,501a…ワーク出力キュー群
502…出力先振り分けワークキュー
511,512,512a…ラウンドロビン機能部
101 ... Receiving interface section
102: Transmission interface
103a, 103b ... Switch part
111 ... Reception control section
112 ... Transmission control section
120… Work control section
130 ... Core
131 ... Thread
140 ... Main memory
150 ... multi-core processor
160 ... Bus interface
201 ... Data packet
210 ... Packet element table
211… Work table
220 ... Packet queue group
221 ... Work queue group
230 ... Packet transmission scheduler
231 ... Work scheduler
401: Processing packet output queue group
402: Output destination packet queue
403 ... Output queue group
501,501a ... Work output queue group
502: Output destination work queue
511,512,512a… Round robin function

Claims (13)

プロセッサーコアと、
処理の完了したパケットがストアされる複数の出力キューと、
受信したパケットに対する処理を複数のサブワークに分割し、該各サブワークを前記プロセッサーコア上で実行されるスレッドに割り当てるワークコントロール部とを備え、
前記ワークコントロール部は、前記複数の出力キューの中に輻輳している出力キューが存在する場合は、該輻輳している出力キューをストア先にしているパケットに関連するサブワークについてはスレッドの割り当てを制限することを特徴とする通信装置。
Processor cores,
Multiple output queues where processed packets are stored;
A work control unit that divides the processing for the received packet into a plurality of sub-work, and assigns each sub-work to a thread executed on the processor core;
When there is a congested output queue among the plurality of output queues, the work control unit assigns a thread to a subwork related to a packet having the congested output queue as a store destination. A communication device characterized by restricting.
請求項1に記載の通信装置において、
前記輻輳している出力キューは、使用率が第1の閾値を超える出力キューであることを特徴とする通信装置。
The communication device according to claim 1,
The communication device, wherein the congested output queue is an output queue whose usage rate exceeds a first threshold value.
請求項1または2に記載の通信装置において、
前記サブワークに対するスレッドの割り当ての制限は、前記サブワークに対するスレッドの割り当てを禁止することであることを特徴とする通信装置。
The communication device according to claim 1 or 2,
The communication apparatus according to claim 1, wherein the limitation on the assignment of threads to the subwork is to prohibit the assignment of threads to the subwork.
請求項1または2に記載の通信装置において、
前記サブワークに対するスレッドの割り当ての制限は、前記サブワークに対するスレッドの割り当て頻度を他のスレッドに比較して少なくすることであることを特徴とする通信装置。
The communication device according to claim 1 or 2,
The communication device is characterized in that the restriction on the assignment of threads to the subwork is to reduce the frequency of assignment of threads to the subwork compared to other threads.
請求項1乃至4の何れか1項に記載の通信装置において、
前記出力キューにストアされているパケットは、そのパケットに関する全てのサブワークが完了した後、送出されることを特徴とする通信装置。
The communication apparatus according to any one of claims 1 to 4,
The communication apparatus is characterized in that the packet stored in the output queue is sent out after all sub-work related to the packet is completed.
請求項1乃至5の何れか1項に記載の通信装置において、
前記ワークコントロール部は、前記複数のサブワークを前記プロセッサーコア上で実行されるスレッドに割り当てる際、優先度の高いサブワークから優先的にスレッドを割り当てることを特徴とする通信装置。
The communication apparatus according to any one of claims 1 to 5,
The work control unit, when assigning the plurality of sub-work to a thread executed on the processor core, preferentially assigns a thread from a sub-work having a high priority.
請求項6に記載の通信装置において、
パケットのストア先にする出力キューを決定するサブワークの優先度を他のサブワークよりも高くすることを特徴とする通信装置。
The communication device according to claim 6.
A communication apparatus characterized in that the priority of a subwork for determining an output queue to be a packet storage destination is higher than that of other subwork.
請求項6に記載の通信装置において、
前記出力キュー毎の処理待ちパケット出力キューであって、処理が未完了のパケットをストアし、処理が完了したパケットを自処理待ちパケット出力キューに対応する出力キューへ出力する処理待ちパケット出力キューを備え、
使用率が第2の閾値以上の処理待ちパケット出力キューに関連するサブワークの優先度を他のサブワークよりも高くすることを特徴とする通信装置。
The communication device according to claim 6.
A process waiting packet output queue for each output queue, which stores a process unfinished packet and outputs a process completed packet to an output queue corresponding to its own process waiting packet output queue. Prepared,
A communication apparatus characterized in that a priority of a subwork related to a processing-waiting packet output queue whose usage rate is equal to or higher than a second threshold is higher than that of other subwork.
請求項1乃至8の何れか1項に記載の通信装置において、
前記プロセッサーコアは複数存在することを特徴とする通信装置。
The communication device according to any one of claims 1 to 8,
2. A communication apparatus comprising a plurality of the processor cores.
ワークコントロール部が、受信したパケットに対する処理を複数のサブワークに分割する第1のステップと、
前記ワークコントロール部が、サブワークをプロセッサーコア上で実行される複数のスレッドの内の何れかに割り当てる際、処理が完了したパケットがストアされる複数の出力キューの中に輻輳している出力キューが存在する場合は、該輻輳している出力キューをストア先にしているパケットに関連するサブワークについてはスレッドの割り当てを制限する第2のステップとを含むことを特徴とする通信方法。
A first step in which the work control unit divides the processing for the received packet into a plurality of sub-work;
When the work control unit assigns a sub work to any one of a plurality of threads executed on the processor core, an output queue that is congested in a plurality of output queues in which processed packets are stored A sub-work related to a packet that stores the congested output queue as a store destination, the second step of restricting thread allocation.
請求項10に記載の通信方法において、
前記輻輳している出力キューは、使用率が第1の閾値を超える出力キューであることを特徴とする通信方法。
The communication method according to claim 10,
The communication method, wherein the congested output queue is an output queue whose usage rate exceeds a first threshold value.
請求項10または11に記載の通信方法において、
前記サブワークに対するスレッドの割り当ての制限は、前記サブワークに対するスレッドの割り当てを禁止することであることを特徴とする通信方法。
The communication method according to claim 10 or 11,
The communication method according to claim 1, wherein the limitation on the assignment of threads to the subwork is to prohibit the assignment of threads to the subwork.
請求項10または11に記載の通信方法において、
前記サブワークに対するスレッドの割り当ての制限は、前記サブワークに対するスレッドの割り当て頻度を他のスレッドに比較して少なくすることであることを特徴とする通信方法。
The communication method according to claim 10 or 11,
The communication method is characterized in that the limitation of the thread allocation to the subwork is to reduce the frequency of thread allocation to the subwork as compared to other threads.
JP2009069400A 2009-03-23 2009-03-23 Communication equipment and communication method Withdrawn JP2010226275A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009069400A JP2010226275A (en) 2009-03-23 2009-03-23 Communication equipment and communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009069400A JP2010226275A (en) 2009-03-23 2009-03-23 Communication equipment and communication method

Publications (1)

Publication Number Publication Date
JP2010226275A true JP2010226275A (en) 2010-10-07

Family

ID=43043014

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009069400A Withdrawn JP2010226275A (en) 2009-03-23 2009-03-23 Communication equipment and communication method

Country Status (1)

Country Link
JP (1) JP2010226275A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729267A (en) * 2011-05-20 2018-02-23 英特尔公司 The scattered distribution of resource and the interconnection structure for support by multiple engine execute instruction sequences
KR20180094369A (en) * 2017-02-15 2018-08-23 주식회사 시큐아이 Network device and interrupt management method of the network device
US10740126B2 (en) 2013-03-15 2020-08-11 Intel Corporation Methods, systems and apparatus for supporting wide and efficient front-end operation with guest-architecture emulation
CN113419871A (en) * 2021-06-21 2021-09-21 Oppo广东移动通信有限公司 Object processing method based on synchronous slot and related product
US11163720B2 (en) 2006-04-12 2021-11-02 Intel Corporation Apparatus and method for processing an instruction matrix specifying parallel and dependent operations
US11204769B2 (en) 2011-03-25 2021-12-21 Intel Corporation Memory fragments for supporting code block execution by using virtual cores instantiated by partitionable engines
US11656875B2 (en) 2013-03-15 2023-05-23 Intel Corporation Method and system for instruction block to execution unit grouping

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11163720B2 (en) 2006-04-12 2021-11-02 Intel Corporation Apparatus and method for processing an instruction matrix specifying parallel and dependent operations
US11204769B2 (en) 2011-03-25 2021-12-21 Intel Corporation Memory fragments for supporting code block execution by using virtual cores instantiated by partitionable engines
CN107729267A (en) * 2011-05-20 2018-02-23 英特尔公司 The scattered distribution of resource and the interconnection structure for support by multiple engine execute instruction sequences
CN107729267B (en) * 2011-05-20 2022-01-25 英特尔公司 Distributed allocation of resources and interconnect structure for supporting execution of instruction sequences by multiple engines
US10740126B2 (en) 2013-03-15 2020-08-11 Intel Corporation Methods, systems and apparatus for supporting wide and efficient front-end operation with guest-architecture emulation
US11656875B2 (en) 2013-03-15 2023-05-23 Intel Corporation Method and system for instruction block to execution unit grouping
KR20180094369A (en) * 2017-02-15 2018-08-23 주식회사 시큐아이 Network device and interrupt management method of the network device
KR101912393B1 (en) * 2017-02-15 2018-10-26 주식회사 시큐아이 Network device and interrupt management method of the network device
CN113419871A (en) * 2021-06-21 2021-09-21 Oppo广东移动通信有限公司 Object processing method based on synchronous slot and related product
CN113419871B (en) * 2021-06-21 2023-01-31 Oppo广东移动通信有限公司 Object processing method based on synchronous groove and related product

Similar Documents

Publication Publication Date Title
US11962490B2 (en) Systems and methods for per traffic class routing
US10530846B2 (en) Scheduling packets to destination virtual machines based on identified deep flow
US9244880B2 (en) Automatic construction of deadlock free interconnects
CN108965132B (en) A method and device for selecting a path
US9154442B2 (en) Concurrent linked-list traversal for real-time hash processing in multi-core, multi-thread network processors
JP5603481B2 (en) Relay device
JP5931908B2 (en) Techniques for managing traffic in routers
JP2010226275A (en) Communication equipment and communication method
CN112084027B (en) On-chip network data transmission method, device, on-chip network, equipment and medium
US8149846B2 (en) Data processing system and method
CN105511954A (en) Method and device for message processing
JP2016195375A (en) Method and apparatus for using multiple linked memory lists
TW201001975A (en) Network system with quality of service management and associated management method
KR101639797B1 (en) Network interface apparatus and method for processing virtual machine packets
CN107797848A (en) Process scheduling method, device and host device
CN111756586A (en) A priority queue-based fair bandwidth allocation method, switch and readable storage medium in a data center network
JP6069913B2 (en) Information processing system, information processing system control method, and control program
EP2912811B1 (en) Traffic engineering system for preventing demand deadlock and achieving uniform link utilization
JP2004046372A (en) Distributed processing system, resource allocation method and program, and recording medium on which resource allocation program is recorded
JP5704567B2 (en) Node device, system, and packet processing method
CN118433093A (en) Multipath routing selection method, device, electronic device and storage medium
CN104360843A (en) Priority-based JMS (java messaging service) message scheduling method in SOA (service-oriented architecture) system
WO2022088074A1 (en) Instruction processing method based on multiple instruction engines, and processor
US10341246B1 (en) Update packet sequence number packet ready command
CN115242727B (en) User request processing method, device, equipment and medium

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20120605